[haiku-development] select_sync reference counting

  • From: Hamish Morrison <hamishm53@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 10 Jun 2015 22:52:57 +0100

Hi all,

Does anyone know why select_sync is reference counted? When an fd or
thread is selected, it acquires a reference to the select_sync, and
gives it up when it is deselected. However since everything is
deselected before select/poll/wait_for_objects return, there doesn't
seem to be any need for the ref counting.

Also - for some reason selected ports and semaphores do not acquire a
reference to the sync, only fds and threads.

Am I missing something?

Cheers,
Hamish

Other related posts: