- Use better multiple-inclusion header file protection names
- Use doxygen-friendly names This commit was SVN r363.
Этот коммит содержится в:
родитель
b5c5d27090
Коммит
3e6822b8ac
@ -2,8 +2,8 @@
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#ifndef _MUTEX_SPINLOCK_
|
||||
#define _MUTEX_SPINLOCK_
|
||||
#ifndef LAM_MUTEX_SPINLOCK_
|
||||
#define LAM_MUTEX_SPINLOCK_
|
||||
|
||||
#include "lam/os/atomic.h"
|
||||
typedef lam_lock_data_t lam_mutex_t;
|
||||
@ -14,4 +14,3 @@ typedef lam_lock_data_t lam_mutex_t;
|
||||
#define lam_mutex_unlock(m) spinunlock(m)
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -2,8 +2,8 @@
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#ifndef _MUTEX_SPINWAIT_
|
||||
#define _MUTEX_SPINWAIT_
|
||||
#ifndef LAM_MUTEX_SPINWAIT_
|
||||
#define LAM_MUTEX_SPINWAIT_
|
||||
|
||||
#include <pthread.h>
|
||||
#include "os/atomic.h"
|
||||
@ -13,12 +13,13 @@
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct lam_mutex {
|
||||
struct lam_mutex_t {
|
||||
volatile int mutex_spinlock;
|
||||
volatile int mutex_waiting;
|
||||
pthread_mutex_t mutex_lock;
|
||||
pthread_cond_t mutex_cond;
|
||||
} lam_mutex_t;
|
||||
};
|
||||
struct lam_mutex_t lam_mutex_t;
|
||||
|
||||
|
||||
static inline void lam_mutex_init(lam_mutex_t* m)
|
||||
@ -64,4 +65,3 @@ static inline void lam_mutex_unlock(lam_mutex_t* m)
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user