#ifndef BASE_SYSTHR_H
#define BASE_SYSTHR_H
#ifndef NOINTNSAPI
#define INTNSAPI
#endif
#ifndef NETSITE_H
#include "../daemon/netsite.h"
#include "../public/nsapi.h"
#endif
#define THREAD_ANY
#ifdef THREAD_ANY
#define INTNSAPI
#ifdef INTNSAPI
#ifdef __cplusplus
extern "C" {
#endif
typedef void* (*posix_thrstartfunc)(
void *);
NSAPI_PUBLIC
SYS_THREAD INTsysthread_start(
int prio,
int stksz, thrstartfunc fn,
void *arg);
NSAPI_PUBLIC SYS_THREAD INTsysthread_current(
void);
NSAPI_PUBLIC void INTsysthread_yield(
void);
NSAPI_PUBLIC SYS_THREAD INTsysthread_attach(
void);
NSAPI_PUBLIC void INTsysthread_detach(
SYS_THREAD thr);
NSAPI_PUBLIC void INTsysthread_terminate(
SYS_THREAD thr);
NSAPI_PUBLIC void INTsysthread_sleep(
int msec);
NSAPI_PUBLIC void INTsysthread_init(
char *name);
NSAPI_PUBLIC void INTsysthread_timerset(
int usec);
NSAPI_PUBLIC int INTsysthread_newkey(
void);
NSAPI_PUBLIC void *INTsysthread_getdata(
int key);
NSAPI_PUBLIC void INTsysthread_setdata(
int key,
void *data);
NSAPI_PUBLIC
void INTsysthread_set_default_stacksize(
unsigned long size);
#ifdef __cplusplus
}
#endif
#define systhread_start INTsysthread_start
#define systhread_current INTsysthread_current
#define systhread_yield INTsysthread_yield
#define systhread_attach INTsysthread_attach
#define systhread_detach INTsysthread_detach
#define systhread_terminate INTsysthread_terminate
#define systhread_sleep INTsysthread_sleep
#define systhread_init INTsysthread_init
#define systhread_timerset INTsysthread_timerset
#define systhread_newkey INTsysthread_newkey
#define systhread_getdata INTsysthread_getdata
#define systhread_setdata INTsysthread_setdata
#define systhread_set_default_stacksize INTsysthread_set_default_stacksize
#endif
#endif
#endif