237,7 → 237,7 |
__asm__ __volatile__( |
"int $0x40" |
:"=a"(old_event_mask) |
:"a"(40)); |
:"a"(40),"b"(event_mask)); |
|
return old_event_mask; |
}; |
273,7 → 273,7 |
return val; |
}; |
|
static inline uint32_t check_os_event() |
static inline uint32_t check_os_event(void) |
{ |
uint32_t val; |
__asm__ __volatile__( |
283,7 → 283,7 |
return val; |
}; |
|
static inline uint32_t get_os_event() |
static inline uint32_t get_os_event(void) |
{ |
uint32_t val; |
__asm__ __volatile__( |
328,7 → 328,7 |
} |
|
static inline |
uint32_t get_os_button() |
uint32_t get_os_button(void) |
{ |
uint32_t val; |
__asm__ __volatile__( |
453,7 → 453,7 |
}; |
static inline ufile_t LoadFile(const char *path) __attribute__ ((alias ("load_file"))); |
|
static inline int GetScreenSize() |
static inline int GetScreenSize(void) |
{ |
int retval; |
|
514,6 → 514,42 |
::"a"(73),"b"(0),"c"(&bc.dstx)); |
}; |
|
#define TLS_KEY_PID 0 |
#define TLS_KEY_TID 4 |
#define TLS_KEY_LOW_STACK 8 |
#define TLS_KEY_HIGH_STACK 12 |
#define TLS_KEY_LIBC 16 |
|
unsigned int tls_alloc(void); |
int tls_free(unsigned int key); |
|
static inline int tls_set(unsigned int key, void *val) |
{ |
int ret = -1; |
if(key < 4096) |
{ |
__asm__ __volatile__( |
"movl %0, %%fs:(%1)" |
::"r"(val),"r"(key)); |
ret = 0; |
} |
return ret; |
}; |
|
static inline void *tls_get(unsigned int key) |
{ |
void *val = (void*)-1; |
if(key < 4096) |
{ |
__asm__ __volatile__( |
"movl %%fs:(%1), %0" |
:"=r"(val) |
:"r"(key)); |
}; |
return val; |
} |
|
|
int create_thread(int (*proc)(void *param), void *param, int stack_size); |
|
void* load_library(const char *name); |