Skip to content

Commit

Permalink
Add LibC.setrlimit/LibC.getrlimit to all linux/bsd platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
carlhoerberg committed Apr 1, 2021
1 parent e7b46c4 commit a3f4946
Show file tree
Hide file tree
Showing 13 changed files with 147 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib_c/aarch64-darwin/c/sys/resource.cr
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ lib LibC
end

fun getrlimit(Int, Rlimit*) : Int
fun setrlimit(Int, Rlimit*) : Int

RLIMIT_STACK = 3
RLIMIT_NOFILE = 7

struct RUsage
ru_utime : Timeval
Expand Down
13 changes: 13 additions & 0 deletions src/lib_c/aarch64-linux-gnu/c/sys/resource.cr
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
lib LibC
alias RlimT = ULongLong

struct Rlimit
rlim_cur : RlimT
rlim_max : RlimT
end

fun getrlimit(Int, Rlimit*) : Int
fun setrlimit(Int, Rlimit*) : Int

RLIMIT_STACK = 3
RLIMIT_NOFILE = 7

struct RUsage
ru_utime : Timeval
ru_stime : Timeval
Expand Down
13 changes: 13 additions & 0 deletions src/lib_c/aarch64-linux-musl/c/sys/resource.cr
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
lib LibC
alias RlimT = ULongLong

struct Rlimit
rlim_cur : RlimT
rlim_max : RlimT
end

fun getrlimit(Int, Rlimit*) : Int
fun setrlimit(Int, Rlimit*) : Int

RLIMIT_STACK = 3
RLIMIT_NOFILE = 7

struct RUsage
ru_utime : Timeval
ru_stime : Timeval
Expand Down
13 changes: 13 additions & 0 deletions src/lib_c/arm-linux-gnueabihf/c/sys/resource.cr
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
lib LibC
alias RlimT = ULongLong

struct Rlimit
rlim_cur : RlimT
rlim_max : RlimT
end

fun getrlimit(Int, Rlimit*) : Int
fun setrlimit(Int, Rlimit*) : Int

RLIMIT_STACK = 3
RLIMIT_NOFILE = 7

struct RUsage
ru_utime : Timeval
ru_stime : Timeval
Expand Down
13 changes: 13 additions & 0 deletions src/lib_c/i386-linux-gnu/c/sys/resource.cr
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
lib LibC
alias RlimT = ULongLong

struct Rlimit
rlim_cur : RlimT
rlim_max : RlimT
end

fun getrlimit(Int, Rlimit*) : Int
fun setrlimit(Int, Rlimit*) : Int

RLIMIT_STACK = 3
RLIMIT_NOFILE = 7

struct RUsage
ru_utime : Timeval
ru_stime : Timeval
Expand Down
13 changes: 13 additions & 0 deletions src/lib_c/i386-linux-musl/c/sys/resource.cr
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
lib LibC
alias RlimT = ULongLong

struct Rlimit
rlim_cur : RlimT
rlim_max : RlimT
end

fun getrlimit(Int, Rlimit*) : Int
fun setrlimit(Int, Rlimit*) : Int

RLIMIT_STACK = 3
RLIMIT_NOFILE = 7

struct RUsage
ru_utime : Timeval
ru_stime : Timeval
Expand Down
2 changes: 2 additions & 0 deletions src/lib_c/x86_64-darwin/c/sys/resource.cr
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ lib LibC
end

fun getrlimit(Int, Rlimit*) : Int
fun setrlimit(Int, Rlimit*) : Int

RLIMIT_STACK = 3
RLIMIT_NOFILE = 7

struct RUsage
ru_utime : Timeval
Expand Down
13 changes: 13 additions & 0 deletions src/lib_c/x86_64-dragonfly/c/sys/resource.cr
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
lib LibC
alias RlimT = ULongLong

struct Rlimit
rlim_cur : RlimT
rlim_max : RlimT
end

fun getrlimit(Int, Rlimit*) : Int
fun setrlimit(Int, Rlimit*) : Int

RLIMIT_STACK = 3
RLIMIT_NOFILE = 7

struct RUsage
ru_utime : Timeval
ru_stime : Timeval
Expand Down
13 changes: 13 additions & 0 deletions src/lib_c/x86_64-freebsd/c/sys/resource.cr
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
lib LibC
alias RlimT = ULongLong

struct Rlimit
rlim_cur : RlimT
rlim_max : RlimT
end

fun getrlimit(Int, Rlimit*) : Int
fun setrlimit(Int, Rlimit*) : Int

RLIMIT_STACK = 3
RLIMIT_NOFILE = 7

struct RUsage
ru_utime : Timeval
ru_stime : Timeval
Expand Down
13 changes: 13 additions & 0 deletions src/lib_c/x86_64-linux-gnu/c/sys/resource.cr
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
lib LibC
alias RlimT = ULongLong

struct Rlimit
rlim_cur : RlimT
rlim_max : RlimT
end

fun getrlimit(Int, Rlimit*) : Int
fun setrlimit(Int, Rlimit*) : Int

RLIMIT_STACK = 3
RLIMIT_NOFILE = 7

struct RUsage
ru_utime : Timeval
ru_stime : Timeval
Expand Down
13 changes: 13 additions & 0 deletions src/lib_c/x86_64-linux-musl/c/sys/resource.cr
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
lib LibC
alias RlimT = ULongLong

struct Rlimit
rlim_cur : RlimT
rlim_max : RlimT
end

fun getrlimit(Int, Rlimit*) : Int
fun setrlimit(Int, Rlimit*) : Int

RLIMIT_STACK = 3
RLIMIT_NOFILE = 7

struct RUsage
ru_utime : Timeval
ru_stime : Timeval
Expand Down
13 changes: 13 additions & 0 deletions src/lib_c/x86_64-netbsd/c/sys/resource.cr
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
lib LibC
alias RlimT = ULongLong

struct Rlimit
rlim_cur : RlimT
rlim_max : RlimT
end

fun getrlimit(Int, Rlimit*) : Int
fun setrlimit(Int, Rlimit*) : Int

RLIMIT_STACK = 3
RLIMIT_NOFILE = 7

struct RUsage
ru_utime : Timeval
ru_stime : Timeval
Expand Down
13 changes: 13 additions & 0 deletions src/lib_c/x86_64-openbsd/c/sys/resource.cr
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
lib LibC
alias RlimT = ULongLong

struct Rlimit
rlim_cur : RlimT
rlim_max : RlimT
end

fun getrlimit(Int, Rlimit*) : Int
fun setrlimit(Int, Rlimit*) : Int

RLIMIT_STACK = 3
RLIMIT_NOFILE = 7

struct RUsage
ru_utime : Timeval
ru_stime : Timeval
Expand Down

0 comments on commit a3f4946

Please sign in to comment.