Introduction   API Reference   Examples   Index  

types.h

Go to the documentation of this file.
00001 /* $Id: types.h 26833 2006-08-21 11:24:59Z ra3 $ */
00002 /*****************************************************************************/
00012 /*****************************************************************************/
00013 
00014 /* (c) 2003 Technische Universitaet Dresden
00015  * This file is part of DROPS, which is distributed under the terms of the
00016  * GNU General Public License 2. Please see the COPYING file for details.
00017  */
00018 
00019 #ifndef _L4_LOCK_TYPES_H
00020 #define _L4_LOCK_TYPES_H
00021 
00022 /* L4env includes */
00023 #include <l4/env/cdefs.h>
00024 #include <l4/semaphore/semaphore.h>
00025 #include <l4/thread/thread.h>
00026 
00027 /* Lib includes */
00028 #include <l4/lock/internal.h>
00029 
00030 /*****************************************************************************
00031  * data types
00032  *****************************************************************************/
00033 
00034 __BEGIN_DECLS;
00035 
00040 typedef struct l4lock l4lock_t;
00041 
00042 __END_DECLS;
00043 
00044 /*****************************************************************************
00045  * defines 
00046  *****************************************************************************/
00047 
00054 #define L4LOCK_LOCKED_INITIALIZER(t) \
00055         {(L4SEMAPHORE_LOCKED_INITIALIZER),(t),1}
00056 
00062 #define L4LOCK_LOCKED(t) ((l4lock_t) L4LOCK_LOCKED_INITIALIZER(t))
00063 
00069 #define L4LOCK_UNLOCKED_INITIALIZER \
00070         {L4SEMAPHORE_UNLOCKED_INITIALIZER, (L4THREAD_INVALID_ID),0}
00071 
00076 #define L4LOCK_UNLOCKED  ((l4lock_t) L4LOCK_UNLOCKED_INITIALIZER)
00077 
00078 #endif /* !_L4_LOCK_TYPES_H */

L4 Lock Reference Manual, written by Lars Reuther  © 2000-2003