Subversion Repositories Kolibri OS

Rev

Rev 1964 | Rev 2161 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1964 Rev 1967
Line 54... Line 54...
54
struct mutex_waiter {
54
struct mutex_waiter {
55
	struct list_head	list;
55
	struct list_head	list;
56
    int                *task;
56
    int                *task;
57
};
57
};
Line -... Line 58...
-
 
58
 
-
 
59
 
-
 
60
#define __MUTEX_INITIALIZER(lockname) \
-
 
61
                { .count = ATOMIC_INIT(1) \
-
 
62
                , .wait_list = LIST_HEAD_INIT(lockname.wait_list) }
-
 
63
 
-
 
64
#define DEFINE_MUTEX(mutexname) \
-
 
65
        struct mutex mutexname = __MUTEX_INITIALIZER(mutexname)
58
 
66
 
59
void __attribute__ ((fastcall)) __attribute__ ((dllimport))
67
void __attribute__ ((fastcall)) __attribute__ ((dllimport))
60
     mutex_init(struct mutex*)__asm__("MutexInit");
68
     mutex_init(struct mutex*)__asm__("MutexInit");
61
void __attribute__ ((fastcall)) __attribute__ ((dllimport))
69
void __attribute__ ((fastcall)) __attribute__ ((dllimport))
62
     mutex_lock(struct mutex*)__asm__("MutexLock");
70
     mutex_lock(struct mutex*)__asm__("MutexLock");