ladybird/Userland/Libraries/LibC/sys/file.h
Peter Elliott 2ce8cca7b5 LibC: Implement flock(2) using fcntl's F_SETLK
While flock is not a posix interface, it exists on linux and all BSDs as
far as I am aware.
2021-07-20 17:44:30 +04:30

20 lines
297 B
C

/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <sys/cdefs.h>
__BEGIN_DECLS
#define LOCK_SH 0
#define LOCK_EX 1
#define LOCK_UN 2
#define LOCK_NB (1 << 2)
int flock(int fd, int operation);
__END_DECLS