[問題] linux pthread souce code 該哪找

看板Programming作者 (蚊子)時間18年前 (2008/01/05 01:11), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/2 (看更多)
我想找pthread可以用Doxygen建起來的souce code 主要是方便看每個結構的樣子 函式實做的內容 找了一陣子網路上有用Doxygen建起來的應該都是別的平台的 試了gnu的glibc-linuxthreads 看起來也不是能直接用的 大概就是要看這樣的東西 http://www.jbox.dk/sanos/source/include/pthread.h.html struct pthread_mutex { long lock; // Exclusive access to mutex state: // 0: unlocked/free // 1: locked - no other waiters // -1: locked - with possible other waiters long recursion; // Number of unlocks a thread needs to perform // before the lock is released (recursive mutexes only) int kind; // Mutex type pthread_t owner; // Thread owning the mutex handle_t event; // Mutex release notification to waiting threads };typedef struct pthread_mutex pthread_mutex_t; http://www.jbox.dk/sanos/source/lib/pthread/mutex.c.html int pthread_mutex_destroy(pthread_mutex_t *mutex) { if (!mutex) return EINVAL; if (close(mutex->event) < 0) return errno; return 0; } 謝謝! -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 124.10.118.236
文章代碼(AID): #17VcZDOF (Programming)
文章代碼(AID): #17VcZDOF (Programming)