Commit 539a9bda authored by Barry Perlman's avatar Barry Perlman Committed by Yoni Fogel

Improved comments only

git-svn-id: file:///svn/toku/tokudb@11700 c7de825b-a66e-492c-adef-691d508d4ae1
parent 78ebdd82
...@@ -164,7 +164,10 @@ static inline void cachetable_unlock(CACHETABLE ct __attribute__((unused))) { ...@@ -164,7 +164,10 @@ static inline void cachetable_unlock(CACHETABLE ct __attribute__((unused))) {
} }
// Wait for cache table space to become available // Wait for cache table space to become available
// size_current is number of bytes currently occupied by data (referred to by pairs)
// size_writing is number of bytes queued up to be written out (sum of sizes of pairs in CTPAIR_WRITING state)
static inline void cachetable_wait_write(CACHETABLE ct) { static inline void cachetable_wait_write(CACHETABLE ct) {
// if we're writing more than half the data in the cachetable
while (2*ct->size_writing > ct->size_current) { while (2*ct->size_writing > ct->size_current) {
workqueue_wait_write(&ct->wq, 0); workqueue_wait_write(&ct->wq, 0);
} }
......
...@@ -169,7 +169,7 @@ static int workqueue_deq(WORKQUEUE wq, WORKITEM *wiptr, int dolock) { ...@@ -169,7 +169,7 @@ static int workqueue_deq(WORKQUEUE wq, WORKITEM *wiptr, int dolock) {
return 0; return 0;
} }
// Suspend a work queue writer thread // Suspend the caller (thread that is currently attempting to put more work items into the work queue)
__attribute__((unused)) __attribute__((unused))
static void workqueue_wait_write(WORKQUEUE wq, int dolock) { static void workqueue_wait_write(WORKQUEUE wq, int dolock) {
if (dolock) workqueue_lock(wq); if (dolock) workqueue_lock(wq);
...@@ -179,7 +179,7 @@ static void workqueue_wait_write(WORKQUEUE wq, int dolock) { ...@@ -179,7 +179,7 @@ static void workqueue_wait_write(WORKQUEUE wq, int dolock) {
if (dolock) workqueue_unlock(wq); if (dolock) workqueue_unlock(wq);
} }
// Wakeup the waiting work queue writer threads // Wakeup all threads that are currently attempting to put more work items into the work queue
__attribute__((unused)) __attribute__((unused))
static void workqueue_wakeup_write(WORKQUEUE wq, int dolock) { static void workqueue_wakeup_write(WORKQUEUE wq, int dolock) {
if (wq->want_write) { if (wq->want_write) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment