BUILD: import: guard plock.h against multiple inclusion

Surprisingly there's no include guard in plock.h though there is one in
atomic-ops.h. Let's add one, or we cannot risk including the file multiple
times.
This commit is contained in:
Willy Tarreau 2023-08-26 17:27:24 +02:00
parent a7b9baa2cc
commit 892d04733f
1 changed files with 5 additions and 0 deletions

View File

@ -23,6 +23,9 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef PL_PLOCK_H
#define PL_PLOCK_H
#include "atomic-ops.h"
#ifdef _POSIX_PRIORITY_SCHEDULING
#include <sched.h>
@ -1415,3 +1418,5 @@ static inline void pl_lorw_unlock(unsigned long *lock)
else
pl_lorw_rdunlock(lock);
}
#endif /* PL_PLOCK_H */