]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
common: thread: get number of threads from /proc
authorColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Tue, 15 Feb 2011 19:02:03 +0000 (11:02 -0800)
committerColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Tue, 15 Feb 2011 19:02:03 +0000 (11:02 -0800)
commit6fb416b083d518e5f524359cc3cacb66ccc63dca
tree19674a0efb1fd318f82ec8cae52ccb479c443092
parentfec2483465a8c1036d8cef04e589173c48b028ad
common: thread: get number of threads from /proc

The kernel knows how many threads we have; just ask it. One less atomic
variable to carry around.

We will eventually have to avoid doing this check for non-daemon code,
but that's a separate issue.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
src/Makefile.am
src/common/Thread.cc [new file with mode: 0644]
src/common/Thread.h
src/config.cc
src/msg/SimpleMessenger.cc