Make service ports lock-free
The service port list is now iterated in a safe and lock-free manner. This makes the handling of service ports somewhat simpler since once an item has been added to the list it will never be removed. It also removes the need to lock the service when checking whether a service listens on a port which caused potential deadlocks.
This commit is contained in:
@ -47,6 +47,7 @@ typedef struct servlistener
|
||||
struct users *users; /**< The user data for this listener */
|
||||
struct service* service; /**< The service which used by this listener */
|
||||
SPINLOCK lock;
|
||||
int active; /**< True if the port has not been deleted */
|
||||
struct servlistener *next; /**< Next service protocol */
|
||||
} SERV_LISTENER;
|
||||
|
||||
|
Reference in New Issue
Block a user