]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
Thread: remove globals. Thread create must succeed
authorColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Fri, 10 Jun 2011 01:26:58 +0000 (18:26 -0700)
committerColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Fri, 10 Jun 2011 01:32:32 +0000 (18:32 -0700)
commitdadf2a3fa22fefe78615cebcd98c98993f1eaf94
tree879cd81e1de741421c6e2faf2b881490f8ad07bc
parent4e0ddae48f0c00b852c4fd3ee25758f415e0961c
Thread: remove globals. Thread create must succeed

Remove the references to global variables from Thread.h. They are really
unecessary. In every case, the printout is followed by an assert which
will deliver the exact same information.

Assert that thread creation succeeds. Nobody was checking the return
value of Thread::create() previously. Added a new function,
Thread::try_create(), which programmers can use if they do want to check
the value of Thread::create() and handle it appropriately.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
src/common/Thread.h