summaryrefslogtreecommitdiffstats
path: root/osi/include
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2015-11-12 21:25:28 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2015-11-12 21:25:27 -0800
commit3be3bdbe56b9e9c5a4a615144cd80abda2eb7b7d (patch)
treeb7f2c90b7f4a58b594ba7e1c07c8d6b8f88e9712 /osi/include
parentf9329bff3979d7839b5ff6263c49450e92fc1a15 (diff)
parent0102d8c2a4c06de26972a4aaac4093a95e593429 (diff)
downloadandroid_system_bt-3be3bdbe56b9e9c5a4a615144cd80abda2eb7b7d.tar.gz
android_system_bt-3be3bdbe56b9e9c5a4a615144cd80abda2eb7b7d.tar.bz2
android_system_bt-3be3bdbe56b9e9c5a4a615144cd80abda2eb7b7d.zip
Merge "Bluetooth: Boost timer callback thread priority to high"
Diffstat (limited to 'osi/include')
-rw-r--r--osi/include/thread.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/osi/include/thread.h b/osi/include/thread.h
index def4aa509..9e5602a41 100644
--- a/osi/include/thread.h
+++ b/osi/include/thread.h
@@ -23,6 +23,9 @@
#define THREAD_NAME_MAX 16
+// Increase callback thread priority to high
+#define TIMER_CALLBACK_THREAD_PRIORITY -19
+
typedef struct reactor_t reactor_t;
typedef struct thread_t thread_t;
typedef void (*thread_fn)(void *context);
@@ -58,6 +61,11 @@ bool thread_post(thread_t *thread, thread_fn func, void *context);
// |thread| may not be NULL.
void thread_stop(thread_t *thread);
+// Attempts to sets the |priority| of a given |thread|.
+// The |thread| has to be running for this call to succeed.
+// Returns true on success.
+bool thread_set_priority(thread_t *thread, int priority);
+
// Returns true if the current thread is the same as the one represented by |thread|.
// |thread| may not be NULL.
bool thread_is_self(const thread_t *thread);