summaryrefslogtreecommitdiffstats
path: root/btcore
diff options
context:
space:
mode:
authorPavlin Radoslavov <pavlin@google.com>2015-09-24 22:07:53 -0700
committerScott James Remnant <keybuk@google.com>2015-10-19 10:36:26 -0700
commit1eb1ea0cf2da992a3193506806e571dcbe3ec947 (patch)
treeb9c9868fa7a90db5a7237a57dc233403beffd825 /btcore
parentc196f214c5ae349ec2022f8d3cbaf56910b3b9f8 (diff)
downloadandroid_system_bt-1eb1ea0cf2da992a3193506806e571dcbe3ec947.tar.gz
android_system_bt-1eb1ea0cf2da992a3193506806e571dcbe3ec947.tar.bz2
android_system_bt-1eb1ea0cf2da992a3193506806e571dcbe3ec947.zip
GKI cleanup - Moved functions GKI_disable() and GKI_enable() to OSI
Added new functions mutex_global_lock() and mutex_global_unlock() within the OSI module, and replaced GKI_disable() and GKI_enable() with those functions. Also, minor cleanup in the gki.h header file. Change-Id: I5f410e3174541224fcf30f37e1524ef099c25193
Diffstat (limited to 'btcore')
-rw-r--r--btcore/src/osi_module.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/btcore/src/osi_module.c b/btcore/src/osi_module.c
index 9ba968589..96783bc48 100644
--- a/btcore/src/osi_module.c
+++ b/btcore/src/osi_module.c
@@ -23,16 +23,23 @@
#include "osi/include/alarm.h"
#include "osi/include/future.h"
#include "osi/include/log.h"
+#include "osi/include/mutex.h"
#include "osi/include/osi.h"
+future_t *osi_init(void) {
+ mutex_init();
+ return future_new_immediate(FUTURE_SUCCESS);
+}
+
future_t *osi_clean_up(void) {
alarm_cleanup();
- return NULL;
+ mutex_cleanup();
+ return future_new_immediate(FUTURE_SUCCESS);
}
const module_t osi_module = {
.name = OSI_MODULE,
- .init = NULL,
+ .init = osi_init,
.start_up = NULL,
.shut_down = NULL,
.clean_up = osi_clean_up,