2013-04-11から1日間の記事一覧
memcachedのソース見てたら気になる処理あったのでメモ。以下は、memcached(見たバージョンは1.4.15)の中のthread.cの関数。 unsigned short refcount_incr(unsigned short *refcount) { #ifdef HAVE_GCC_ATOMICS return __sync_add_and_fetch(refcount, 1);…
memcachedのソース見てたら気になる処理あったのでメモ。以下は、memcached(見たバージョンは1.4.15)の中のthread.cの関数。 unsigned short refcount_incr(unsigned short *refcount) { #ifdef HAVE_GCC_ATOMICS return __sync_add_and_fetch(refcount, 1);…