Changeset View
Changeset View
Standalone View
Standalone View
lib/libthr/arch/arm/include/pthread_md.h
Show All 33 Lines | |||||
#ifndef _PTHREAD_MD_H_ | #ifndef _PTHREAD_MD_H_ | ||||
#define _PTHREAD_MD_H_ | #define _PTHREAD_MD_H_ | ||||
#include <sys/types.h> | #include <sys/types.h> | ||||
#include <machine/tls.h> | #include <machine/tls.h> | ||||
#define CPU_SPINWAIT | #define CPU_SPINWAIT | ||||
/* For use in _Static_assert to check structs will fit in a page */ | |||||
#define THR_PAGE_SIZE_MIN PAGE_SIZE | |||||
static __inline struct pthread * | static __inline struct pthread * | ||||
_get_curthread(void) | _get_curthread(void) | ||||
{ | { | ||||
if (_thr_initial) | if (_thr_initial) | ||||
return (_tcb_get()->tcb_thread); | return (_tcb_get()->tcb_thread); | ||||
return (NULL); | return (NULL); | ||||
} | } | ||||
#endif /* _PTHREAD_MD_H_ */ | #endif /* _PTHREAD_MD_H_ */ |