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
import cbaos v0.1
[cbaos.git]
/
arch
/
unix
/
include
/
sched.h
blob
7500f53e389166b94ee919c4566f87eb30aeb502
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
#endif