1/*! 2 \file SupportDefs.h 3 \ingroup support 4 \brief Defines basic types and definitions for the Haiku API. 5*/ 6 7/*! 8 \name Short byte long Type Formats 9*/ 10 11//! @{ 12 13/*! 14 \typedef typedef signed char int8 15*/ 16 17/*! 18 \typedef typedef unsigned char uint8 19*/ 20 21/*! 22 \typedef typedef volatile signed char vint8 23*/ 24 25/*! 26 \typedef typedef volatile unsigned char vuint8 27*/ 28 29//! @} 30 31/*! 32 \name Short 2-byte long Type Formats 33*/ 34 35//! @{ 36 37/*! 38 \typedef typedef short int16 39*/ 40 41/*! 42 \typedef typedef unsigned short uint16 43*/ 44 45/*! 46 \typedef typedef volatile short vint16 47*/ 48 49/*! 50 \typedef typedef volatile unsigned short vuint16 51*/ 52 53//! @} 54 55/*! 56 \name Short 4-byte long Type Formats 57*/ 58 59//! @{ 60 61/*! 62 \typedef typedef long int32 63*/ 64 65/*! 66 \typedef typedef unsigned long uint32 67*/ 68 69/*! 70 \typedef typedef volatile long vint32 71*/ 72 73/*! 74 \typedef typedef volatile unsigned long vuint32 75*/ 76 77//! @} 78 79/*! 80 \name Short 8-byte long Type Formats 81*/ 82 83//! @{ 84 85/*! 86 \typedef typedef long long int64 87*/ 88 89/*! 90 \typedef typedef unsigned long long uint64 91*/ 92 93/*! 94 \typedef typedef volatile long long vint64 95*/ 96 97/*! 98 \typedef typedef volatile unsigned long long vuint64 99*/ 100 101//! @} 102 103/*! 104 \name Short volatile Type Formats 105*/ 106 107//! @{ 108 109/*! 110 \typedef typedef volatile long vlong 111*/ 112 113/*! 114 \typedef typedef volatile int vint 115*/ 116 117/*! 118 \typedef typedef volatile short vshort 119*/ 120 121/*! 122 \typedef typedef volatile char vchar 123*/ 124 125/*! 126 \typedef typedef volatile unsigned long vulong 127*/ 128 129/*! 130 \typedef typedef volatile unsigned int vuint 131*/ 132 133/*! 134 \typedef typedef volatile unsigned short vushort 135*/ 136 137/*! 138 \typedef typedef volatile unsigned char vuchar 139*/ 140 141//! @} 142 143/*! 144 \name Character Type Formats 145*/ 146 147//! @{ 148 149/*! 150 \typedef typedef unsigned char uchar 151*/ 152 153/*! 154 \typedef typedef unsigned short unichar 155*/ 156 157//! @} 158 159/*! 160 \name Descriptive Type Formats 161*/ 162 163//! @{ 164 165/*! 166 \typedef typedef int32 status_t 167 \brief Represents one of the status codes defined in Error.h 168*/ 169 170/*! 171 \typedef typedef int64 bigtime_t 172 \brief Represents time. The unit depends on the context of the function. 173*/ 174 175/*! 176 \typedef typedef uint32 type_code 177 \brief Represents a certain type of data. See TypeConstants.h for possible 178 values. 179*/ 180 181/*! 182 \typedef typedef uint32 perform_code 183 \brief Unused. Defined by Be to support 'hidden' commands or 184 extensions to classes. The Haiku API has none of these. 185*/ 186 187//! @} 188 189//////////////// Odds and ends 190 191/*! 192 \var const char *B_EMPTY_STRING 193 \brief Defines an empty string. Currently defined as the C-string "". 194*/ 195 196/*! 197 \def min_c(a,b) 198 \brief Returns the minimum of the values a and b. 199 200 \note When including this header in a C file, use the C equivalent called 201 \c min(a,b). 202*/ 203 204/*! 205 \def max_c(a,b) 206 \brief Returns the maximum of values a and b. 207 208 \note When including this header in a C file, use the C equivalent called 209 \c max(a,b). 210*/ 211 212/*! 213 \def NULL 214 \brief Defines the constant \c NULL if it hasn't been defined anywhere before. 215*/ 216 217/*! 218 \addtogroup support_globals 219*/ 220 221//! @{ 222 223/*! 224 \fn int32 atomic_set(vint32 *value, int32 newValue) 225 \brief Undocumented. 226 \sa atomic_set64() for a version that works on \c long \c long 227 \sa atomic_test_and_set(), atomic_add(), atomic_and(), 228 atomic_or(), atomic_get() 229*/ 230 231/*! 232 \fn int32 atomic_test_and_set(vint32 *value, int32 newValue, int32 testAgainst) 233 \brief Undocumented. 234 \sa atomic_test_and_set64() for a version that works on \c long \c long 235 \sa atomic_set(), atomic_add(), atomic_and(), 236 atomic_or(), atomic_get() 237*/ 238 239/*! 240 \fn int32 atomic_add(vint32 *value, int32 addValue) 241 \brief Undocumented. 242 \sa atomic_add64() for a version that works on \c long \c long 243 \sa atomic_set(), atomic_test_and_set(), atomic_and(), 244 atomic_or(), atomic_get() 245*/ 246 247/*! 248 \fn int32 atomic_and(vint32 *value, int32 andValue) 249 \brief Undocumented. 250 \sa atomic_and64() for a version that works on \c long \c long 251 \sa atomic_set(), atomic_test_and_set(), atomic_add(), 252 atomic_or(), atomic_get() 253*/ 254 255 256/*! 257 \fn int32 atomic_or(vint32 *value, int32 orValue) 258 \brief Undocumented. 259 \sa atomic_or64() for a version that works on \c long \c long 260 \sa atomic_set(), atomic_test_and_set(), atomic_add(), atomic_and(), 261 atomic_get() 262*/ 263 264/*! 265 \fn int32 atomic_get(vint32 *value) 266 \brief Undocumented. 267 \sa atomic_get64() for a version that works on \c long \c long 268 \sa atomic_set(), atomic_test_and_set(), atomic_add(), atomic_and(), 269 atomic_or() 270*/ 271 272/*! 273 \fn int64 atomic_set64(vint64 *value, int64 newValue) 274 \brief Undocumented. 275 \sa atomic_set() for a version that works on an \c int32 276 \sa atomic_test_and_set64(), atomic_add64(), atomic_and64(), 277 atomic_or64(), atomic_get64() 278*/ 279 280/*! 281 \fn int64 atomic_test_and_set64(vint64 *value, int64 newValue, int64 testAgainst) 282 \brief Undocumented. 283 \sa atomic_test_and_set() for a version that works on an \c int32 284 \sa atomic_set64(), atomic_add64(), atomic_and64(), 285 atomic_or64(), atomic_get64() 286*/ 287 288/*! 289 \fn int64 atomic_add64(vint64 *value, int64 addValue) 290 \brief Undocumented. 291 \sa atomic_add() for a version that works on an \c int32 292 \sa atomic_set64(), atomic_test_and_set64(), atomic_and64(), 293 atomic_or64(), atomic_get64() 294*/ 295 296/*! 297 \fn int64 atomic_and64(vint64 *value, int64 andValue) 298 \brief Undocumented. 299 \sa atomic_and() for a version that works on an \c int32 300 \sa atomic_set64(), atomic_test_and_set64(), atomic_add64(), 301 atomic_or64(), atomic_get64() 302*/ 303 304/*! 305 \fn int64 atomic_or64(vint64 *value, int64 orValue) 306 \brief Undocumented. 307 \sa atomic_or() for a version that works on an \c int32 308 \sa atomic_set64(), atomic_test_and_set64(), atomic_add64(), atomic_and64(), 309 atomic_get64() 310*/ 311 312/*! 313 \fn int64 atomic_get64(vint64 *value) 314 \brief Undocumented. 315 \sa atomic_get() for a version that works on an \c int32 316 \sa atomic_set64(), atomic_test_and_set64(), atomic_add64(), atomic_and64(), 317 atomic_or64() 318*/ 319 320//! @} 321 322/*! 323 \fn void* get_stack_frame(void) 324 \brief This is internal, I guess. Else this needs to be documented. 325 \internal 326*/ 327 328//! @{ 329 330/*! 331 \def FALSE 332 \brief Obsolete. Use \c false. 333*/ 334 335/*! 336 \def TRUE 337 \brief Obsolete. Use \c true. 338*/ 339 340//! @} 341