github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/freebsd/ksem.txt (about)

     1  # Copyright 2020 syzkaller project authors. All rights reserved.
     2  # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
     3  
     4  include <sys/types.h>
     5  include <sys/ksem.h>
     6  include <fcntl.h>
     7  
     8  resource semid[intptr]
     9  
    10  ksem_init(idp ptr[out, semid], value int32)
    11  ksem_open(idp ptr[out, semid], name ptr[in, string], oflag flags[ksem_oflag], mode flags[open_mode], value int32)
    12  ksem_unlink(name ptr[in, string])
    13  ksem_getvalue(id semid, val ptr[out, int32])
    14  ksem_destroy(id semid)
    15  ksem_close(id semid)
    16  ksem_post(id semid)
    17  ksem_wait(id semid)
    18  ksem_trywait(id semid)
    19  
    20  ksem_oflag = O_CREAT, O_EXCL