Re: [Bluez-devel] Re: read_RSSI and others not thread-safe?

Stefan Mischke
2004-10-08T16:02:11Z

Hi Marcel!

Ok, but I don't understand why my problem occurs. Look at this:
- thread T1 does hci_send_req(read_RSSI), waits for event E1
- thread T2 does hci_send_req(read_RSSI), waits for event E2
- Lets assume E2 comes earlier than E1
Why do BOTH threads receive E2? When is an event consumed?

Regards
Stefan

Marcel Holtmann schrieb:

>Hi Stefan,
>
>
>it is a raw socket and every process can get all events. It is not
>possible to prevent this and actually the HCI itself is not designed for
>something like this. However you must be root to get some special
>events.
>
>Regards
>
>Marcel
>
>
>
>