Last change
on this file since 244 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.6 KB
|
Line | |
---|
1 | #ifndef SRL_SCHED_WAIT_H |
---|
2 | #define SRL_SCHED_WAIT_H |
---|
3 | |
---|
4 | #include "srl_public_types.h" |
---|
5 | |
---|
6 | /** |
---|
7 | * @file |
---|
8 | * @module{SRL} |
---|
9 | * @short Smart waiting tools |
---|
10 | */ |
---|
11 | |
---|
12 | #define DECLARE_WAIT(name, cmp) \ |
---|
13 | /** \ |
---|
14 | @this makes the current task sleep until the value pointed at @tt addr \ |
---|
15 | asserts the following test: \ |
---|
16 | \ |
---|
17 | @code \ |
---|
18 | (*addr cmp val) \ |
---|
19 | @end code \ |
---|
20 | \ |
---|
21 | @param addr The address to poll \ |
---|
22 | @param val The value to compare to \ |
---|
23 | */ \ |
---|
24 | \ |
---|
25 | void srl_sched_wait_##name(void *addr, sint32_t val ); |
---|
26 | |
---|
27 | DECLARE_WAIT(eq, ==) |
---|
28 | DECLARE_WAIT(ne, !=) |
---|
29 | DECLARE_WAIT(le, <=) |
---|
30 | DECLARE_WAIT(ge, >=) |
---|
31 | DECLARE_WAIT(lt, <) |
---|
32 | DECLARE_WAIT(gt, >) |
---|
33 | |
---|
34 | #undef DECLARE_WAIT |
---|
35 | |
---|
36 | |
---|
37 | void srl_sleep_cycles(unsigned int n); |
---|
38 | |
---|
39 | #endif |
---|
40 | |
---|
41 | |
---|
42 | // Local Variables: |
---|
43 | // tab-width: 4 |
---|
44 | // c-basic-offset: 4 |
---|
45 | // c-file-offsets:((innamespace . 0)(inline-open . 0)) |
---|
46 | // indent-tabs-mode: nil |
---|
47 | // End: |
---|
48 | // vim: filetype=c:expandtab:shiftwidth=4:tabstop=4:softtabstop=4 |
---|
49 | |
---|
Note: See
TracBrowser
for help on using the repository browser.