Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4973 | right-hear | 1 | #include"ipc.h" |
2 | #include |
||
3 | |||
4 | ipc_hdr_t * create_ipc(unsigned long size) |
||
5 | { |
||
6 | ipc_hdr_t * hdr=(ipc_hdr_t *)malloc(size+sizeof(ipc_hdr_t)); |
||
7 | if(!hdr) return NULL; |
||
8 | hdr->lock=0; |
||
9 | hdr->free_ptr=8; |
||
10 | return hdr; |
||
11 | } |
||
12 | |||
13 | void register_ipc_mem(ipc_hdr_t * hdr) |
||
14 | { |
||
15 | int d0,d1,d2; |
||
16 | __asm__ __volatile__( |
||
17 | "int $0x40" |
||
18 | :"=a"(d0),"=b"(d1),"=c"(d2) |
||
19 | :"0"(60),"1"(1),"2"(hdr) |
||
20 | :"memory"); |
||
21 | } |