Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2334 → Rev 2335

/branches/arm/uspace/libc/arch/arm32/include/thread.h
41,28 → 41,27
 
typedef struct {
void *pst_data;
/* TODO */
} tcb_t;
 
static inline void __tcb_set(tcb_t *tcb)
{
void* tmp = (void*)tcb + sizeof(tcb_t);
asm(
void *tls = (void *)tcb + sizeof(tcb_t);
asm volatile (
"mov r9, %0"
:
: "r"(tmp)
: "r"(tls)
);
}
 
static inline tcb_t *__tcb_get(void)
{
void* ret;
asm(
void *ret;
asm volatile (
"mov %0, r9"
: "=r"(ret)
);
ret -= sizeof(tcb_t);
return (tcb_t*)ret;
return (tcb_t *)ret;
}
 
#endif