Last change
on this file since 238 was
228,
checked in by meunier, 12 years ago
|
Added support for memspaces and const.
Added an interrupt masking to the "giet_context_switch" syscall
Corrected two bugs in boot/boot_init.c (one minor and one regarding barriers initialization)
Reformatted the code in all files.
|
File size:
1.1 KB
|
Line | |
---|
1 | /* |
---|
2 | * This file is part of DSX, development environment for static |
---|
3 | * SoC applications. |
---|
4 | * |
---|
5 | * This file is distributed under the terms of the GNU General Public |
---|
6 | * License. |
---|
7 | * |
---|
8 | * Copyright (c) 2006, Nicolas Pouillon, <nipo@ssji.net> |
---|
9 | * Laboratoire d'informatique de Paris 6 / ASIM, France |
---|
10 | * |
---|
11 | * $Id$ |
---|
12 | */ |
---|
13 | |
---|
14 | #ifndef SRL_LOCK_H_ |
---|
15 | #define SRL_LOCK_H_ |
---|
16 | |
---|
17 | /** |
---|
18 | * @file |
---|
19 | * @module{SRL} |
---|
20 | * @short Lock operations |
---|
21 | */ |
---|
22 | |
---|
23 | #include "spin_lock.h" |
---|
24 | |
---|
25 | typedef giet_lock_t * srl_lock_t; |
---|
26 | |
---|
27 | /** |
---|
28 | @this takes a lock. |
---|
29 | |
---|
30 | @param lock The lock object |
---|
31 | */ |
---|
32 | #define srl_lock_lock(lock) lock_acquire(lock); |
---|
33 | |
---|
34 | /** |
---|
35 | @this releases a lock. |
---|
36 | |
---|
37 | @param lock The lock object |
---|
38 | */ |
---|
39 | #define srl_lock_unlock( lock ) lock_release(lock); |
---|
40 | |
---|
41 | /** |
---|
42 | @this tries to take a lock. @this returns whether the lock was |
---|
43 | actually taken. |
---|
44 | |
---|
45 | @param lock The lock object |
---|
46 | @return 0 if the lock was taken successfully |
---|
47 | */ |
---|
48 | #define srl_lock_try_lock( lock ) lock_try_acquire( lock ); |
---|
49 | |
---|
50 | #endif |
---|
51 | |
---|
52 | |
---|
53 | // Local Variables: |
---|
54 | // tab-width: 4 |
---|
55 | // c-basic-offset: 4 |
---|
56 | // c-file-offsets:((innamespace . 0)(inline-open . 0)) |
---|
57 | // indent-tabs-mode: nil |
---|
58 | // End: |
---|
59 | // vim: filetype=c:expandtab:shiftwidth=4:tabstop=4:softtabstop=4 |
---|
60 | |
---|
Note: See
TracBrowser
for help on using the repository browser.