摘要: http://fihopzz.blogspot.com/2013/07/enter-post-title-here-binary-search-and.html 阅读全文
posted @ 2013-08-01 18:10 一只会思考的猪 阅读(120) 评论(0) 推荐(0) 编辑
摘要: class rw_lock_t { int NoOfReaders; int NoOfWriters, NoOfWritersWaiting; pthread_mutex_t class_mutex; pthread_cond_t reader_gate; pthread_cond_t writer_gate;public: rw_lock_t() : NoOfReaders(0), NoOfWriters(0), NoOfWritersWating(0), class_mutex(PTHREAD_MUTEX_INITIALIZER), ... 阅读全文
posted @ 2013-08-01 17:40 一只会思考的猪 阅读(281) 评论(0) 推荐(0) 编辑