History log of /system/bt/osi/src/reactor.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
574dcfb73e3741d715f7d4394fe5d3bd587cb0d2 12-May-2016 Pavlin Radoslavov <pavlin@google.com> Restart failed system calls interrupted with errno of EINTR

In number of places we don't handle properly system calls failures
when the errno is EINTR (i.e., the system call was interrupted
by a signal). In all our use cases, the system calls should be
restarted. The handling of the following system calls (as used in the code)
has been updated/fixed:

poll, send, recv, sendmsg, nanosleep, epoll_wait
read - mostly (e.g., socket-like fds)
write - mostly (e.g., socket-like fds)
select, accept, connect

Bug: 28471477
Bug: 28658141
Change-Id: I03e6f0f67e33876780fb6d02c33eb84547ba8f95
/system/bt/osi/src/reactor.c
5fe6f0cf6b223e3ed6be4912d55b3ed5b41ce0cd 06-Feb-2016 Pavlin Radoslavov <pavlin@google.com> Removed checks for NULL returns after osi_calloc() / osi_malloc()

Removed explicit checks for NULL pointer returns after calls
to osi_calloc() and osi_malloc(), because those are not needed.
If the memory allocation fails, osi_calloc() and osi_malloc()
will trigger an assert.

Bug: 27048759
Change-Id: I2791eb2f69c08f991f8fcdef10e101a41568cd95
/system/bt/osi/src/reactor.c
49a86709488e5cfd5e23759da18bf9613e15b04d 08-Jul-2015 Marie Janssen <jamuraa@google.com> build: LOG_TAG consistency, include order, build fixes

Fix the order of includes across a bunch of files, and declare LOG_TAG
at the top of every file in which it is used.

Consistently use bt_ as a LOG_TAG prefix.
Fix issues with LOG macro usage.
Remove unused includes and double-includes (when in related .h)

Add includes as necessary to compile cleanly (problems surfaced by
reordering includes)

Change-Id: Ic55520c8302b06bbc1942c10c448b20844669da6
/system/bt/osi/src/reactor.c
db554581079863974af8e1289646f5deea6fc044 26-Jun-2015 Marie Janssen <jamuraa@google.com> build: Update osi log functions, use consistently

Update the LOG_* functions to take a tag argument which makes them more
consistent with the Android Log.*(TAG, s) common syntax and removes
some #define-dependency with osi/include/log.h.

Also update to never use Android log functions directly.

Also contains minor cleanup of some header includes.

Bug: 21569831
Change-Id: If07385cafbea062232ecdbc7c673f908d5ef8921
/system/bt/osi/src/reactor.c
bb6836b8e3145522c119e9478d5c7e7df75c3890 21-May-2015 Arman Uguray <armansito@google.com> build: Build net_test_osi using GN + ninja

This CL adds support to build the net_test_osi target using GN + ninja.
The BUILD.gn file now pulls in gtest as a dependency. Missing libc
includes have been added to sources that prevented compilation on
Goobuntu (14.04).

The osi/include/log.h header has been modified to conditionally call the
Android log utilities vs plain-old printf on non-Android builds.

BUG=21339022

Change-Id: If3c356360c56c63b3bf551b41dc8d3269d8e7e09
/system/bt/osi/src/reactor.c
a9962ce69ef78a4720183c70deb5db8cfbc70cf0 16-Apr-2015 Mark Salyzyn <salyzyn@google.com> bluedroid: compile error hammerhead-userdebug_clang

- This was a clang complaint, not a gcc complaint
- memset event to be portable to all compile environments
- error as follows:

external/bluetooth/bluedroid/osi/./src/reactor.c:90:34:
error: missing field data initializer [-Werror,-Wmissing-field-initializers]
struct epoll_event event = { 0 };
^
external/bluetooth/bluedroid/osi/./src/reactor.c:151:34:
error: missing field data initializer [-Werror,-Wmissing-field-initializers]
struct epoll_event event = { 0 };
^
external/bluetooth/bluedroid/osi/./src/reactor.c:174:34:
error: missing field data initializer [-Werror,-Wmissing-field-initializers]
struct epoll_event event = { 0 };
^
3 errors generated.
make: *** [out/target/product/hammerhead/obj/STATIC_LIBRARIES/libosi_intermediates/./src/reactor.o] Error 1

Change-Id: I14b884cf1665c68aff1e5afd3df65ac10af474d2
/system/bt/osi/src/reactor.c
3e59b5b6f2ce1295e3e2711afcd2cdf0dd7e22b6 01-Apr-2015 Etan Cohen <etancohen@google.com> Fix build issues in bluedroid on master

Change-Id: I0d3e93ea61dd03505fe9db902ed90bdd4141cab2
/system/bt/osi/src/reactor.c
0f9b91e150e153229235c163861198e23600e636 12-Mar-2015 Sharvil Nanavati <sharvil@google.com> Use fully qualified path for OSI includes.
/system/bt/osi/src/reactor.c
44802768c447ab480d4227b3a852a97d923b816d 24-Dec-2014 Sharvil Nanavati <sharvil@google.com> Add platform-independent logging macros to OSI.

These macros should replace ALOG* and the various trace macros
used throughout bluedroid. This change eliminates all uses of the
ALOG* macros in favor of the new ones.
/system/bt/osi/src/reactor.c
cee5cb10c6513a0180f7e1abdca41e7a4cc565ec 30-Aug-2014 Sharvil Nanavati <sharvil@google.com> Don't pass in uninitialized memory to epoll_ctl. Make valgrind happy.
/system/bt/osi/src/reactor.c
384f8a948e9837475c4f504a626205334522df2a 26-Aug-2014 Zach Johnson <zachoverflow@google.com> Move some of osi to use the allocation interfaces

Also changes some tests to ensure all memory freed.
/system/bt/osi/src/reactor.c
fbf89085bf308a98b00da77d1538539f6dd58604 13-Aug-2014 Sharvil Nanavati <sharvil@google.com> Switch to an epoll-based reactor implementation.

epoll is a much nicer interface that very closely matches the
reactor interface. It's also thread-safe which makes it a more
suitable choice for bluedroid. As a result of this change,
reactor_register and reactor_unregister are both thread-safe without
introducing any synchronization in user-space.
/system/bt/osi/src/reactor.c
ec4059a70320b2020e0c0a41baa27082004d479d 05-Aug-2014 Zach Johnson <zachoverflow@google.com> Fix reactor to use prepend, fix reactor tests
/system/bt/osi/src/reactor.c
2cb29985655784b0775519e581bc3f29e95c45ea 02-Aug-2014 Sharvil Nanavati <sharvil@google.com> Define INVALID_FD to improve readability and reduce likelihood of errors
/system/bt/osi/src/reactor.c
13959e09db608be74b80de6ec2bc6730a8cce5df 26-Jul-2014 Sharvil Nanavati <sharvil@google.com> Wake up reactor whenever a new object is registered/unregistered.

Before this change, if the reactor was blocked waiting for an event
and a new object was registered, it would not wait for events on the
new object until it woke up on its own. This change forces the reactor
to re-evaluate the file descriptor set whenever the object list is
modified.
/system/bt/osi/src/reactor.c
19084c6242d8ddb366a52eba5084c974280cce0f 24-Jun-2014 Sharvil Nanavati <sharvil@google.com> Implement the reactor pattern in C.

This code will form the basis of most select-based event loops in
bluedroid. It provides a thread-safe abort routine and a separation
between the dispatcher and event handler code.

Change-Id: I6f1c033d18f045ba273187dab607c209dfe32d30
/system/bt/osi/src/reactor.c