gzpk

2013年6月27日

关于C的int

摘要: 在c运行库头文件中typedef各种类型的inttypedef signed char int8_t;typedef unsigned char uint8_t;typedef signed int int16_t;typedef unsigned int uint16_t;typedef signed long int int32_t;typedef unsigned long int uint32_t;typedef signed long long int int64_t;typedef unsigned long long int uint64_t; 阅读全文

posted @ 2013-06-27 16:51 gzpk 阅读(233) 评论(0) 推荐(0)

互斥量mutex的简单使用

摘要: 几个重要的函数:#include int pthread_mutex_init(pthread_mutex_t *restrict mutex, const pthread_mutex_t *restrict attr); //初始化mutexint pthread_mutex_destroy(pthread_mutex_t *mutex); //如果mutex是动态分配的,则释放内存前调用此函数。int pthread_mutex_lock(pthread_mutex_t *mutex); //加锁int pthread_mutex_trylock(pthread_mutex_t *mute 阅读全文

posted @ 2013-06-27 10:05 gzpk 阅读(2529) 评论(1) 推荐(0)

导航