Subversion Repositories Kolibri OS

Rev

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

Rev 5345 Rev 5347
Line 39... Line 39...
39
#ifdef __KERNEL__
39
#ifdef __KERNEL__
40
#include 
40
#include 
Line 41... Line 41...
41
 
41
 
Line -... Line 42...
-
 
42
#define FASTCALL __attribute__ ((fastcall)) __attribute__ ((dllimport))
42
#define FASTCALL __attribute__ ((fastcall)) __attribute__ ((dllimport))
43
 
43
 
44
void  FASTCALL InitRwsem(struct rw_semaphore *sem)__asm__("InitRwsem");
44
void  FASTCALL DownRead(struct rw_semaphore *sem)__asm__("DownRead");
45
void  FASTCALL DownRead(struct rw_semaphore *sem)__asm__("DownRead");
45
void  FASTCALL DownWrite(struct rw_semaphore *sem)__asm__("DownWrite");
46
void  FASTCALL DownWrite(struct rw_semaphore *sem)__asm__("DownWrite");
Line -... Line 47...
-
 
47
void  FASTCALL UpRead(struct rw_semaphore *sem)__asm__("UpRead");
-
 
48
void  FASTCALL UpWrite(struct rw_semaphore *sem)__asm__("UpWrite");
-
 
49
 
-
 
50
static inline void __init_rwsem(struct rw_semaphore *sem, const char *name,
-
 
51
                  struct lock_class_key *key)
-
 
52
{
46
void  FASTCALL UpRead(struct rw_semaphore *sem)__asm__("UpRead");
53
    InitRwsem(sem);
47
void  FASTCALL UpWrite(struct rw_semaphore *sem)__asm__("UpWrite");
54
}
48
 
55
 
49
/*
56
/*
50
 * lock for reading
57
 * lock for reading
51
 */
58
 */
52
static inline void __down_read(struct rw_semaphore *sem)
59
static inline void down_read(struct rw_semaphore *sem)
Line 53... Line 60...
53
{
60
{
54
    DownRead(sem);
61
    DownRead(sem);
55
}
62
}
56
 
63
 
Line 57... Line 64...
57
static inline void __down_write(struct rw_semaphore *sem)
64
static inline void down_write(struct rw_semaphore *sem)
58
{
65
{
59
    DownWrite(sem);
66
    DownWrite(sem);
60
}
67
}
61
 
68
 
62
/*
69
/*
63
 * unlock after reading
70
 * unlock after reading
Line 64... Line 71...
64
 */
71
 */
65
static inline void __up_read(struct rw_semaphore *sem)
72
static inline void up_read(struct rw_semaphore *sem)
66
{
73
{
67
    UpRead(sem);
74
    UpRead(sem);
68
}
75
}
69
 
76
 
70
/*
77
/*
Line 71... Line 78...
71
 * unlock after writing
78
 * unlock after writing