mirror of
https://github.com/fumiama/simple-dict.git
synced 2026-06-13 06:50:29 +08:00
优化输出
This commit is contained in:
3
server.c
3
server.c
@@ -661,15 +661,16 @@ static void handle_accept(void *p) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
timer_pointer_of(p)->timerthread = thread;
|
timer_pointer_of(p)->timerthread = thread;
|
||||||
|
puts("Creating timer thread succeeded");
|
||||||
} else {
|
} else {
|
||||||
pthread_mutex_lock(&timer_pointer_of(p)->tmc);
|
pthread_mutex_lock(&timer_pointer_of(p)->tmc);
|
||||||
pthread_cond_signal(&timer_pointer_of(p)->tc); // wakeup thread
|
pthread_cond_signal(&timer_pointer_of(p)->tc); // wakeup thread
|
||||||
pthread_mutex_unlock(&timer_pointer_of(p)->tmc);
|
pthread_mutex_unlock(&timer_pointer_of(p)->tmc);
|
||||||
|
puts("Waking up timer thread succeeded");
|
||||||
}
|
}
|
||||||
pthread_cleanup_push((void*)&cleanup_thread, p);
|
pthread_cleanup_push((void*)&cleanup_thread, p);
|
||||||
puts("Handling accept...");
|
puts("Handling accept...");
|
||||||
while(1) {
|
while(1) {
|
||||||
puts("Creating timer thread succeeded");
|
|
||||||
int accept_fd = timer_pointer_of(p)->accept_fd;
|
int accept_fd = timer_pointer_of(p)->accept_fd;
|
||||||
uint32_t index = timer_pointer_of(p)->index;
|
uint32_t index = timer_pointer_of(p)->index;
|
||||||
uint8_t *buff = timer_pointer_of(p)->buf;
|
uint8_t *buff = timer_pointer_of(p)->buf;
|
||||||
|
|||||||
Reference in New Issue
Block a user