LwIP Platform Developers Manual 中文翻译(19)

2020-12-22 08:09

struct thread_struct_wrapper *lwip_system_threads = NULL; // a list of all threads created by lwIP

sys_thread_t sys_thread_new(char *name, void (* thread)(void *arg), void *arg, int stacksize, int prio) {

sys_thread_t newthread;

SYS_ARCH_DECL_PROTECT(old_val);

newthread = malloc(sizeof(struct thread_struct_wrapper)); // allocate the space for the thread wrapper

if (newthread==NULL) return NULL;

SYS_ARCH_PROTECT(old_val); // Need to protect this -- preemption here could be a problem!

newthread.next = lwip_system_threads;

lwip_system_threads = newthread;

SYS_ARCH_UNPROTECT(old_val);

newthread.timeouts = NULL; // initialize the linked list to NULL

my_system_os_create_thread_function(&newthread.thread,


LwIP Platform Developers Manual 中文翻译(19).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:交通处罚单管理系统(C程序设计)修改版

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: