diff --git a/uthread.cpp b/uthread.cpp index e865c92..2054d4e 100644 --- a/uthread.cpp +++ b/uthread.cpp @@ -78,7 +78,7 @@ int uthread_create(schedule_t &schedule,Fun func,void *arg) getcontext(&(t->ctx)); t->ctx.uc_stack.ss_sp = t->stack; - t->ctx.uc_stack.ss_size = DEFAULT_STACK_SZIE; + t->ctx.uc_stack.ss_size = DEFAULT_STACK_SIZE; t->ctx.uc_stack.ss_flags = 0; t->ctx.uc_link = &(schedule.main); schedule.running_thread = id; diff --git a/uthread.h b/uthread.h index ce955a9..402ee45 100644 --- a/uthread.h +++ b/uthread.h @@ -19,7 +19,7 @@ #include #include -#define DEFAULT_STACK_SZIE (1024*128) +#define DEFAULT_STACK_SIZE (1024*128) #define MAX_UTHREAD_SIZE 1024 enum ThreadState{FREE,RUNNABLE,RUNNING,SUSPEND}; @@ -34,7 +34,7 @@ typedef struct uthread_t Fun func; void *arg; enum ThreadState state; - char stack[DEFAULT_STACK_SZIE]; + char stack[DEFAULT_STACK_SIZE]; }uthread_t; typedef struct schedule_t