Rev 6536 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6536 | Rev 9874 | ||
---|---|---|---|
Line 34... | Line 34... | ||
34 | 34 | ||
35 | */ |
35 | */ |
36 | #include |
36 | #include |
37 | #include |
37 | #include |
38 | #include |
- | |
- | 38 | #include |
|
Line 39... | Line 39... | ||
39 | 39 | #include |
|
40 | 40 | ||
41 | 41 | ||
Line 58... | Line 58... | ||
58 | /* ------------------- size_t and alignment properties -------------------- */ |
58 | /* ------------------- size_t and alignment properties -------------------- */ |
Line 59... | Line 59... | ||
59 | 59 | ||
60 | /* The maximum possible size_t value has all bits set */ |
60 | /* The maximum possible size_t value has all bits set */ |
Line 61... | Line 61... | ||
61 | #define MAX_SIZE_T (~(size_t)0) |
61 | #define MAX_SIZE_T (~(size_t)0) |
62 | - | ||
63 | void *user_alloc(size_t size) |
- | |
64 | { |
- | |
65 | void *val; |
- | |
66 | - | ||
67 | // __asm__("int3"); |
- | |
68 | - | ||
69 | __asm__ __volatile__( |
- | |
70 | "int $0x40" |
- | |
71 | :"=a"(val) |
- | |
72 | :"a"(68),"b"(12),"c"(size)); |
- | |
73 | return val; |
- | |
74 | } |
- | |
75 | 62 | ||
76 | static inline |
- | |
77 | int user_free(void *mem) |
- | |
78 | { |
- | |
79 | int val; |
- | |
80 | - | ||
81 | // __asm__("int3"); |
- | |
82 | - | ||
83 | __asm__ __volatile__( |
- | |
84 | "int $0x40" |
- | |
85 | :"=a"(val) |
- | |
86 | :"a"(68),"b"(13),"c"(mem)); |
- | |
87 | return val; |
- | |
Line 88... | Line 63... | ||
88 | } |
63 | #define user_alloc(s) _ksys_alloc(s) |
Line 89... | Line 64... | ||
89 | 64 | #define user_free _ksys_free |
|
90 | 65 |