プロフィール

kosaki

Author:kosaki
連絡先はコチラ

ブログ検索

最近の記事
最近のコメント
最近のトラックバック
リンク
カテゴリー
月別アーカイブ

RSSフィード
FC2ブログランキング

SUSの read write lock の規定がバグってるという話 このエントリーをはてなブックマークに追加

http://austingroupbugs.net/view.php?id=722

glibcは Open POSIX testcase通らないんだけど、規格がバグってんじゃねーのとイチャモンついてる。

pthread_rwlock_wrlock は


Implementations may favor writers over readers to avoid writer
starvation.


glibc pthread_rwlockattr_setkind_np 


pthread_rwlock_rdlock 


If the Thread Execution Scheduling option is supported, and the threads
involved in the lock are executing with the scheduling policies
SCHED_FIFO or SCHED_RR, the calling thread shall not acquire the lock if
a writer holds the lock or if writers of higher or equal priority are
blocked on the lock; otherwise, the calling thread shall acquire the
lock.


SCHED_FIFO, SCHED_RR write 

 pthread_rwlock_rdlock 


The calling thread acquires the read lock if a writer does not hold the
lock and there are no writers blocked on the lock.


readlock  recursive  write 

SCHED_FIFO shall  may  read lock work

関連記事


linux | 【2013-07-15(Mon) 18:44:05】 | Trackback:(0) | Comments:(0)

  1. 無料アクセス解析