#define __THREAD_H
#include <pthread.h>
+#include <errno.h>
class Thread {
private:
}
int join(void **prval = 0) {
- //assert(thread_id); // for now
- //if (thread_id == 0) return -1; // never started.
+ if (thread_id == 0) {
+ cerr << "WARNING: join on thread that was never started" << endl;
+ //assert(0);
+ return -EINVAL; // never started.
+ }
int status = pthread_join(thread_id, prval);
if (status == 0)
dout(10) << "handle_osd_map had " << had << endl;
+ // pass on to clients
+ for (set<int>::iterator it = clientmap.get_mount_set().begin();
+ it != clientmap.get_mount_set().end();
+ it++) {
+ MOSDMap *n = new MOSDMap;
+ n->maps = m->maps;
+ n->incremental_maps = m->incremental_maps;
+ messenger->send_message(n, clientmap.get_inst(*it));
+ }
+
// process locally
objecter->handle_osd_map(m);
assert(is_standby());
}
- // pass on to clients
- for (set<int>::iterator it = clientmap.get_mount_set().begin();
- it != clientmap.get_mount_set().end();
- it++) {
- MOSDMap *n = new MOSDMap;
- n->maps = m->maps;
- n->incremental_maps = m->incremental_maps;
- messenger->send_message(n, clientmap.get_inst(*it));
- }
}