[systemd-devel] Using eventloop from pthread while using sd-bus functions in main threads causes deadlock or corruption

Ben-melech, Shiran shiran.ben-melech at intel.com
Wed Jun 1 13:33:35 UTC 2016


Hi,

i'm writing a small C library using sd-bus to communicate with
bluetooth low energy devices.

Instead of using a loop for reading from a specific characteristic on
the ble device, I want to use eventloop and register for value changes
on the object that represent this characteristic.

When i run the eventloop in a different pthread, since on the main i'm
writing to the ble service to get the data i want from the
characteristic - i get either what seems to be a deadlock or seg
faults.

i've used the example on your blog (
http://0pointer.net/blog/introducing-sd-event.html) to set up the
event.

Can anyone please advise? what might i be doing wrong?

Regards,

Shiran 

---------------------------------------------------------------------
Intel Electronics Ltd.

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


More information about the systemd-devel mailing list