发布时间:2014-11-24 23:07:42
#include #include int *pa = NULL;void * fn_thread1(void * c);int main(void){ pthread_t tid; int err = 0;.........【阅读全文】
发布时间:2014-11-20 13:35:03
一、制作补丁:diff -urP from-file to-fileIf from-file is a directory and to-file is not, diff compares the file in from-file whose file name is that of to-file, and vice versa.If both from-file and to-file are directories, diff compares corresponding files in both director.........【阅读全文】
发布时间:2014-10-29 18:38:45
1. socket 的阻塞与非阻塞的含义:When the message does not fit into the send buffer of the socket, send() normally blocks, unless the socket has been placed in nonblocking I/O mode. In nonblocking mode it would fail with the error EAGAIN or EWOULDBLOCK in .........【阅读全文】
发布时间:2014-10-28 20:52:36
1. time:系统调用功能:返回从 1970-01-01 00:00:00 到此刻秒数。#include <time.h>time_t time(time_t *t);2. gettimeofday:系统调用功能:返回从 1970-01-01 00:00:00 到此刻秒数和毫秒数(比 time 返回的时间更精准)。#include <sys/time.h>int gettimeofday(struct timeval *tv, struct timezone *tz);struc.........【阅读全文】