2 * Copyright 2010-2013 Intel Corporation.
4 * This library is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation, version 2.1.
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 * Disclaimer: The codes contained in these modules may be specific
19 * to the Intel Software Development Platform codenamed Knights Ferry,
20 * and the Intel product codenamed Knights Corner, and are not backward
21 * compatible with other Intel products. Additionally, Intel will NOT
22 * support the codes or instruction set in future products.
24 * Intel offers no warranty of any kind regarding the code. This code is
25 * licensed on an "AS IS" basis and Intel is not obligated to provide
26 * any support, assistance, installation, training, or other services
27 * of any kind. Intel is also not obligated to provide any updates,
28 * enhancements or extensions. Intel specifically disclaims any warranty
29 * of merchantability, non-infringement, fitness for any particular
30 * purpose, and any other warranty.
32 * Further, Intel disclaims all liability of any kind, including but
33 * not limited to liability for infringement of any proprietary rights,
34 * relating to the use of the code, even if Intel is notified of the
35 * possibility of such liability. Except as expressly stated in an Intel
36 * license agreement provided with this code and agreed upon with Intel,
37 * no license, express or implied, by estoppel or otherwise, to any
38 * intellectual property rights is granted herein.
41 Description: Define the types used by APIs of MYO programming.
47 #include <string.h> /* For size_t */
50 * @addtogroup MYOTYPES
62 MYO_SUCCESS
= 0, /*!< Success */
63 MYO_ERROR
, /*!< Error */
65 MYO_INVALID_ENV
, /*!< Invalid Env */
66 MYO_INVALID_ARGUMENT
, /*!< Invalid Argument */
68 MYO_NOT_INITIALIZED
, /*!< Not Initialized */
69 MYO_ALREADY_FINALIZED
,/*!< Already Finalized */
71 MYO_BUF_ERROR
, /*!< Buffer Error */
72 MYO_OUT_OF_RANGE
, /*!< Out of Range */
73 MYO_OUT_OF_MEMORY
, /*!< Out of Memory */
75 MYO_ALREADY_EXISTS
, /*!< Already Exists */
81 /*! Arena Ownership */
83 MYO_ARENA_MINE
= 1, /*!< Arena MINE Ownership */
84 MYO_ARENA_OURS
, /*!< Arena OURS Ownership */
87 /*************************************************************
88 * define the property of MYO Arena
89 ***********************************************************/
90 #define MYO_CONSISTENCY_MODE 0x3
91 #define MYO_RELEASE_CONSISTENCY 0x1
92 #define MYO_STRONG_RELEASE_CONSISTENCY 0x2
93 #define MYO_STRONG_CONSISTENCY 0x3
94 #define MYO_UPDATE_ON_DEMAND 0x8
95 #define MYO_UPDATE_ON_ACQUIRE 0x10
96 #define MYO_RECORD_DIRTY 0x20
97 #define MYO_NOT_RECORD_DIRTY 0x40
98 #define MYO_ONE_VERSION 0x80
99 #define MYO_MULTI_VERSIONS 0x100
100 #define MYO_CONSISTENCY 0x200
101 #define MYO_NO_CONSISTENCY 0x400
102 #define MYO_HOST_TO_DEVICE 0x800
103 #define MYO_DEVICE_TO_HOST 0x1000
104 #define MYO_HYBRID_UPDATE 0x2000
105 typedef unsigned int MyoArena
;
107 typedef void * MyoMutex
;
108 typedef void * MyoSem
;
109 typedef void * MyoBarrier
;
115 #endif // _MYO_TYPES_H_