Skip to content

Commit

Permalink
fixup! Add C bindings for getrlimit(RLIMIT_NOFILE)
Browse files Browse the repository at this point in the history
  • Loading branch information
ysbaddaden committed Oct 3, 2024
1 parent 589993b commit 23eb8e9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 33 deletions.
13 changes: 2 additions & 11 deletions src/lib_c/aarch64-linux-musl/c/sys/resource.cr
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ lib LibC
rlim_max : RlimT
end

RLIMIT_NOFILE = 7

fun getrlimit(Int, Rlimit*) : Int

RLIMIT_STACK = 3
Expand Down Expand Up @@ -33,15 +35,4 @@ lib LibC
RUSAGE_CHILDREN = -1

fun getrusage(who : Int, usage : RUsage*) : Int16

alias RlimT = ULongLong

struct Rlimit
rlim_cur : RlimT
rlim_max : RlimT
end

RLIMIT_NOFILE = 7

fun getrlimit(resource : Int, rlim : Rlimit*) : Int
end
13 changes: 2 additions & 11 deletions src/lib_c/i386-linux-musl/c/sys/resource.cr
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ lib LibC
rlim_max : RlimT
end

RLIMIT_NOFILE = 7

fun getrlimit(Int, Rlimit*) : Int

RLIMIT_STACK = 3
Expand Down Expand Up @@ -33,15 +35,4 @@ lib LibC
RUSAGE_CHILDREN = -1

fun getrusage(who : Int, usage : RUsage*) : Int16

alias RlimT = ULongLong

struct Rlimit
rlim_cur : RlimT
rlim_max : RlimT
end

RLIMIT_NOFILE = 7

fun getrlimit(resource : Int, rlim : Rlimit*) : Int
end
13 changes: 2 additions & 11 deletions src/lib_c/x86_64-linux-musl/c/sys/resource.cr
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ lib LibC
rlim_max : RlimT
end

RLIMIT_NOFILE = 7

fun getrlimit(Int, Rlimit*) : Int

RLIMIT_STACK = 3
Expand Down Expand Up @@ -33,15 +35,4 @@ lib LibC
RUSAGE_CHILDREN = -1

fun getrusage(who : Int, usage : RUsage*) : Int16

alias RlimT = ULongLong

struct Rlimit
rlim_cur : RlimT
rlim_max : RlimT
end

RLIMIT_NOFILE = 7

fun getrlimit(resource : Int, rlim : Rlimit*) : Int
end

0 comments on commit 23eb8e9

Please sign in to comment.