- 19 Oct, 2015 7 commits
-
-
Pavlin Radoslavov authored
* Added new functions to OSI: - fixed_queue_init() - fixed_queue_length() - fixed_queue_try_remove_from_queue() - fixed_queue_try_peek_last() * Renamed fixed_queue_try_peek() to fixed_queue_try_peek_first() * Replaced usage of GKI queue functions with OSI fixed_queue functions: - GKI_init_q() -> fixed_queue_new(SIZE_MAX) NOTE: unlike GKI_init_q(), fixed_queue_new() allocates memory / state that needs to be released by calling fixed_queue_free() - GKI_enqueue() -> fixed_queue_enqueue() - GKI_dequeue() -> fixed_queue_try_dequeue() NOTE: fixed_queue_try_dequeue() is non-blocking - GKI_queue_length() -> fixed_queue_length() - GKI_queue_is_empty() -> fixed_queue_is_empty() - GKI_getfirst() -> fixed_queue_try_peek_first() - GKI_getlast() -> fixed_queue_try_peek_last() - GKI_remove_from_queue() -> fixed_queue_try_remove_from_queue() - Queue elements iteration. In the fixed_queue implementation we have to use the underlying list_t mechanism to iterate over the elements. OLD: p = GKI_getfirst(queue); ... while ((p = GKI_getnext(p) != NULL) { ... } NEW: list_t *list = fixed_queue_get_list(queue); for (const list_node_t *node = list_begin(list); node != list_end(list); node = list_next(node)) { p = list_node(node); } * Remove initialization of the GKI module, because it is not needed anymore * Removed unused files in GKI: gki/common/gki_common.h gki/ulinux/gki_int.h gki/ulinux/gki_ulinux.c Change-Id: I3ff9464db75252d6faf7476a9ca67c88e535c51c
-
Pavlin Radoslavov authored
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
-
Pavlin Radoslavov authored
* Renamed function GKI_get_os_tick_count() to time_get_os_boottime_ms() and moved it to the OSI module: to the new file osi/src/time.c . The corresponding header file is osi/include/time.h * Added unit tests for function time_get_os_boottime_ms() in file osi/test/time_test.cpp * Removed "osi/include" from the list of paths to search for include files. This is needed, because file name collision of "time.h" in osi/include and the system <time.h> Change-Id: I934be0c8f392150a352947326546bcf8aa070f97
-
Pavlin Radoslavov authored
Change-Id: I87168157b9bb3e9d315c03b98a10d18b38cce3e1
-
Pavlin Radoslavov authored
Refactored function l2c_link_adjust_chnl_allocation. Now the buffer quota computation is done without using the GKI poll counts. Change-Id: I669492becc9024c12f3360ea58a06188caa6420a
-
Pavlin Radoslavov authored
* Replace usage of function GKI_getpoolbuf() with GKI_getbuf() * Remove usage of function GKI_poolutilization() * Remove usage of function GKI_poolfreecount() Change-Id: Ide938192b878bbfb4912642c903fce548f2b5368
-
Pavlin Radoslavov authored
Removed function GKI_delay from the GKI module, and replaced it with a local static function inside file btif/src/btif_rc.c - the only place it is (still) used. Change-Id: Id8f3f700efd22d6e31c70aa8b1724ffa9afbc631
-
- 12 Jun, 2015 1 commit
-
-
Arman Uguray authored
This CL removes the -Wno-pointer-to-integer-cast and -Wno-integer-to-pointer-cast flags from GN build files. The resulting errors were fixed using the following: 1. All ptr <-> integer casts are now done by using the new PTR_TO_INT/INT_TO_PTR macros defined in osi.h 2. The TIMER_PARAM_TYPE macro, defined in gki/common/gki.h and include/bt_target.h have been redefined as void* rather than UINT32. This is better, since "void*" can act as a simple container without any precision loss that would be caused by a type such as UINT32 on 64-bit systems. void* inherently is a safer container for all pointer types but UINT32 isn't. BUG=21570302 Change-Id: I4a82c4a40c91caa31e372382c40d424be220cbe3
-
- 16 Mar, 2015 15 commits
-
-
Sharvil Nanavati authored
This change removes all remaining GKI task remnants as well as a few timer and buffer bits.
-
Sharvil Nanavati authored
-
Sharvil Nanavati authored
-
Zach Johnson authored
-
Zach Johnson authored
-
Chris Manton authored
-
Sharvil Nanavati authored
Previously, GKI task entry points had inconsistent signatures. For example, we had: int btif_media_task(void *p) void btif_task(UINT32 params) void btu_task (UINT32 param) The single argument was universally ignored and the caller always set it to 0. This change consolidates all of that and defines the entry point as having 0 arity and no return value.
-
Sharvil Nanavati authored
-
Sharvil Nanavati authored
GKI is slowly disappearing so much of that debug code isn't useful.
-
Sharvil Nanavati authored
-
Sharvil Nanavati authored
-
Sharvil Nanavati authored
GKI_run was called but didn't do anything: it would call sched_setscheduler to increase the priority of the current process but Android OS policy doesn't allow for that. And GKI_stop was never called.
-
Sharvil Nanavati authored
This change also fixes the type for task names: should be a const string, not a mutable INT8*.
-
Chris Manton authored
Also refactored btu_task a bit.
-
Chris Manton authored
Also add another API GKI_queue_length(BUFFER_Q *)
-
- 20 Aug, 2014 1 commit
-
-
Andre Eisenbach authored
Fix potential bug where stale timer list entry causes endless loops in BTU task. Also added return parameter to GKI_remove_from_timer_list() to allow breaking out of the BTU timer task look in case the timer list becomes corrupted. Bug: 16897789 Change-Id: Ic70cf4346efbb063bbb952ebe7c2f7d0bf395493
-
- 12 Aug, 2014 1 commit
-
-
Andre Eisenbach authored
When starting to advertise with a given timeout, the alarm did not fire and thus not stop the advertising. This patch switchs from the new alarm system to use BTU timers. Also fixes a bug in the oneshot timer handling where adding a new timer with a short timeout value would not actually restart the timer to pull in the deadline. Bug: 16988160 Change-Id: Ia556562675636be440ddca7682ac7d092bc0b48b
-
- 16 Jul, 2014 2 commits
-
-
Sharvil Nanavati authored
It's unnecessary, potentially calculated incorrectly, and the insertion logic that depended on it was fragile. I've rewritten the list insertion routine so it's easier to follow. This should also fix http://b/16259295. Change-Id: Ib7184c94c495c03d3acbe105955b1bb712dbbfaa (cherry picked from commit a1bfd3ee)
-
Sharvil Nanavati authored
It's unnecessary, potentially calculated incorrectly, and the insertion logic that depended on it was fragile. I've rewritten the list insertion routine so it's easier to follow. This should also fix http://b/16259295. Change-Id: Ib7184c94c495c03d3acbe105955b1bb712dbbfaa
-
- 02 Jul, 2014 2 commits
-
-
Sharvil Nanavati authored
Change-Id: I4fc3a64312b49a3dd23d80454244f8eb6340d8e6
-
Sharvil Nanavati authored
Specifically: - ISR code (since bluedroid is entirely userspace) - logging macros - newlines in log macros - GKI_get_time_stamp (unused function) - GKI_freeze - unused timer variables and macros Change-Id: I8e0676c28842d87c4148059ebb0320367658bc16
-
- 24 Jun, 2014 2 commits
-
-
Chris Manton authored
Change-Id: I6e05a1054c4bfd8ccd42cd9df8e3140ce67330c4
-
Chris Manton authored
Timer queue and entry were lacking a few functions. Also added field in timer entry to indicate initial timing condition for use in a variable timer Change-Id: I4d987a5bb4eddb48f8c54de8d3da26f1c0b77584
-
- 12 Jun, 2014 1 commit
-
-
Sharvil Nanavati authored
Change-Id: I607bd3bf88ef8847c8a7e984a54eabedd4fb7516 Conflicts: bta/hf_client/bta_hf_client_api.c bta/hf_client/bta_hf_client_main.c
-
- 10 Jun, 2014 2 commits
-
-
Mike Lockwood authored
Change-Id: Ide8190f10add027b18a34bb2604d3cd407d94224
-
Sharvil Nanavati authored
Change-Id: I4c0000445535e5300b83a18f5f6ca45f1ef797da
-
- 09 Jun, 2014 1 commit
-
-
Sharvil Nanavati authored
Change-Id: I607bd3bf88ef8847c8a7e984a54eabedd4fb7516
-
- 13 Dec, 2012 1 commit
-
-
The Android Open Source Project authored
Change-Id: Ia2de32ccb97a9641462c72363b0a8c4288f4f36d
-