Use static local variable for consistency with compressor, dispatch table
This commit is contained in:
@@ -18,8 +18,6 @@
|
|||||||
|
|
||||||
#include "select.h"
|
#include "select.h"
|
||||||
|
|
||||||
Select *Select::instance = NULL;
|
|
||||||
|
|
||||||
fd_set Select::dummy_fd_set;
|
fd_set Select::dummy_fd_set;
|
||||||
|
|
||||||
sigset_t Select::dummy_sigset;
|
sigset_t Select::dummy_sigset;
|
||||||
|
|||||||
+3
-7
@@ -34,16 +34,12 @@
|
|||||||
class Select {
|
class Select {
|
||||||
public:
|
public:
|
||||||
static Select &get_instance( void ) {
|
static Select &get_instance( void ) {
|
||||||
// NB: not thread-safe
|
/* COFU may or may not be thread-safe, depending on compiler */
|
||||||
if ( !instance ) {
|
static Select instance;
|
||||||
instance = new Select;
|
return instance;
|
||||||
}
|
|
||||||
return *instance;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static Select *instance;
|
|
||||||
|
|
||||||
Select()
|
Select()
|
||||||
: max_fd( -1 )
|
: max_fd( -1 )
|
||||||
, got_any_signal( 0 )
|
, got_any_signal( 0 )
|
||||||
|
|||||||
Reference in New Issue
Block a user