repo.or.cz
/
cbaos.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Semi-decennial update. 50% code inflation.
[cbaos.git]
/
arch
/
unix
/
include
/
sched.h
blob
1149222ae675d502ef7a9ad9d3404002f67a27aa
1
#ifndef _ARCH_SCHED_H_
2
#define _ARCH_SCHED_H_
3
4
#include <types.h>
5
6
#include <ucontext.h>
7
8
struct
task_context
{
9
ucontext_t uc
;
10
};
11
12
typedef
sigset_t sched_ctx_t
;
13
14
static
inline
u32
ms2ticks
(
u32 msecs
)
15
{
16
return
msecs
*
1000
;
17
}
18
19
static
inline
u32
ticks2ms
(
u32 ticks
)
20
{
21
return
(
ticks
+
999
) /
1000
;
22
}
23
24
#define MSEC_IN_TICKSOVF ((u32)((0x100000000LL + 1000-1) / (1000)))
25
26
#endif