github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/src/syscall/proc_hosted.go (about)

     1  //go:build !baremetal && !tinygo.wasm
     2  
     3  // This file assumes there is a libc available that runs on a real operating
     4  // system.
     5  
     6  package syscall
     7  
     8  func Getuid() int  { return int(libc_getuid()) }
     9  func Geteuid() int { return int(libc_geteuid()) }
    10  func Getgid() int  { return int(libc_getgid()) }
    11  func Getegid() int { return int(libc_getegid()) }
    12  func Getpid() int  { return int(libc_getpid()) }
    13  func Getppid() int { return int(libc_getppid()) }
    14  
    15  // uid_t getuid(void)
    16  //
    17  //export getuid
    18  func libc_getuid() int32
    19  
    20  // gid_t getgid(void)
    21  //
    22  //export getgid
    23  func libc_getgid() int32
    24  
    25  // uid_t geteuid(void)
    26  //
    27  //export geteuid
    28  func libc_geteuid() int32
    29  
    30  // gid_t getegid(void)
    31  //
    32  //export getegid
    33  func libc_getegid() int32
    34  
    35  // gid_t getpid(void)
    36  //
    37  //export getpid
    38  func libc_getpid() int32
    39  
    40  // gid_t getppid(void)
    41  //
    42  //export getppid
    43  func libc_getppid() int32