atomic.h
Go to the documentation of this file.
1 
8 /*
9  * The contents of this file are subject to the Mozilla Public License
10  * Version 1.0 (the "License"); you may not use this file except in
11  * compliance with the License. You may obtain a copy of the License
12  * at http://www.mozilla.org/MPL/
13  *
14  * Software distributed under the License is distributed on an "AS IS"
15  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
16  * the License for the specific language governing rights and
17  * limitations under the License.
18  *
19  * The Original Code is legOS code, released October 17, 1999.
20  *
21  * The Initial Developer of the Original Code is Markus L. Noga.
22  * Portions created by Markus L. Noga are Copyright (C) 1999
23  * Markus L. Noga. All Rights Reserved.
24  *
25  * Contributor(s): Joseph A. Woolley <jawoolley@users.sourceforge.net
26  * Henner Zeller <H.Zeller@acm.org>
27  */
28 #ifndef __atomic_h__
29 #define __atomic_h__
30 
31 #include <config.h>
32 
33 #ifdef CONF_ATOMIC
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif /* __cplusplus */
38 
43 typedef volatile unsigned char atomic_t;
44 
52 extern void atomic_dec(atomic_t* counter);
53 
61 extern void atomic_inc(atomic_t* counter);
62 
63 #if defined(__cplusplus)
64 }
65 #endif /* __cplusplus */
66 
67 #endif /* CONF_ATOMIC */
68 
69 #endif /* __critsec_h__ */
void atomic_inc(atomic_t *counter)
increment atomic counter without interruption.
volatile unsigned char atomic_t
The data type that allows for atomic count operations.
Definition: atomic.h:43
void atomic_dec(atomic_t *counter)
decrement atomic counter without interruption.

brickOS is released under the Mozilla Public License.
Original code copyright 1998-2005 by the authors.

Generated on Sat Feb 14 2015 23:12:04 for brickOS C++ by doxygen 1.8.9.1