commit | a8434ec14612d9a04e50e1c51e58f663dad46e96 | [log] [tgz] |
---|---|---|
author | Olivier Houchard <ohouchard@haproxy.com> | Fri Jan 18 17:26:26 2019 +0100 |
committer | Olivier Houchard <cognet@ci0.org> | Tue Feb 26 18:17:32 2019 +0100 |
tree | 82be9f45cb4f4e8435f8c8fcab177d2df518afd7 | |
parent | 36839dc39f57739896e411764e8a67e1ebd83cb8 [diff] |
MINOR: lists: Implement locked variations. Implement LIST_ADD_LOCKED(), LIST_ADDQ_LOCKED(), LIST_DEL_LOCKED() and LIST_POP_LOCKED(). LIST_ADD_LOCKED, LIST_ADDQ_LOCKED and LIST_DEL_LOCKED work the same as LIST_ADD, LIST_ADDQ and LIST_DEL, except before any manipulation it locks the relevant elements of the list, so it's safe to manipulate the list with multiple threads. LIST_POP_LOCKED() removes the first element from the list, and returns its data.