OSDN Git Service

Switch to an epoll-based reactor implementation.
[android-x86/system-bt.git] / osi / include / thread.h
index 5b9eb04..17a1f36 100644 (file)
@@ -23,7 +23,6 @@
 #define THREAD_NAME_MAX 16
 
 typedef struct reactor_t reactor_t;
-typedef struct reactor_object_t reactor_object_t;
 typedef struct thread_t thread_t;
 typedef void (*thread_fn)(void *context);
 
@@ -57,14 +56,7 @@ void thread_stop(thread_t *thread);
 // |thread| may not be NULL.
 bool thread_is_self(const thread_t *thread);
 
+reactor_t *thread_get_reactor(const thread_t *thread);
+
 // Returns the name of the given |thread|. |thread| may not be NULL.
 const char *thread_name(const thread_t *thread);
-
-// Registers |reactor_object| with the reactor of the given |thread|
-// in a thread safe manner. Neither |thread| nor |reactor_object| may be NULL.
-void thread_register(thread_t *thread, reactor_object_t *reactor_object);
-
-// Unregisters |reactor_object| with the reactor of the given |thread|
-// in a thread safe manner. Does not return until the unregistration is
-// complete. Neither |thread| nor |reactor_object| may be NULL.
-void thread_unregister(thread_t *thread, reactor_object_t *reactor_object);