Skip to content

Commit 8055dcb

Browse files
committed
Auto merge of #3380 - newpavlov:mcl_onfault, r=JohnTitor
Add `MCL_ONFAULT` constants https://www.man7.org/linux/man-pages/man2/mlockall.2.html
2 parents bd46159 + 26bbe2d commit 8055dcb

File tree

29 files changed

+29
-0
lines changed

29 files changed

+29
-0
lines changed

libc-test/semver/linux.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1375,6 +1375,7 @@ MCAST_MSFILTER
13751375
MCAST_UNBLOCK_SOURCE
13761376
MCL_CURRENT
13771377
MCL_FUTURE
1378+
MCL_ONFAULT
13781379
MEMBARRIER_CMD_GLOBAL
13791380
MEMBARRIER_CMD_GLOBAL_EXPEDITED
13801381
MEMBARRIER_CMD_QUERY

src/unix/linux_like/android/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1707,6 +1707,7 @@ pub const REG_BACKR: ::c_int = 1024;
17071707

17081708
pub const MCL_CURRENT: ::c_int = 0x0001;
17091709
pub const MCL_FUTURE: ::c_int = 0x0002;
1710+
pub const MCL_ONFAULT: ::c_int = 0x0004;
17101711

17111712
pub const CBAUD: ::tcflag_t = 0o0010017;
17121713
pub const TAB1: ::tcflag_t = 0x00000800;

src/unix/linux_like/linux/gnu/b32/arm/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ pub const SOCK_DGRAM: ::c_int = 2;
341341

342342
pub const MCL_CURRENT: ::c_int = 0x0001;
343343
pub const MCL_FUTURE: ::c_int = 0x0002;
344+
pub const MCL_ONFAULT: ::c_int = 0x0004;
344345

345346
pub const POLLWRNORM: ::c_short = 0x100;
346347
pub const POLLWRBAND: ::c_short = 0x200;

src/unix/linux_like/linux/gnu/b32/csky/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ pub const SOCK_DGRAM: ::c_int = 2;
290290

291291
pub const MCL_CURRENT: ::c_int = 0x0001;
292292
pub const MCL_FUTURE: ::c_int = 0x0002;
293+
pub const MCL_ONFAULT: ::c_int = 0x0004;
293294

294295
pub const POLLWRNORM: ::c_short = 0x100;
295296
pub const POLLWRBAND: ::c_short = 0x200;

src/unix/linux_like/linux/gnu/b32/m68k/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ pub const PTRACE_SYSEMU_SINGLESTEP: ::c_uint = 32;
293293

294294
pub const MCL_CURRENT: ::c_int = 0x0001;
295295
pub const MCL_FUTURE: ::c_int = 0x0002;
296+
pub const MCL_ONFAULT: ::c_int = 0x0004;
296297

297298
pub const POLLWRNORM: ::c_short = 0x100;
298299
pub const POLLWRBAND: ::c_short = 0x200;

src/unix/linux_like/linux/gnu/b32/mips/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,7 @@ pub const RTLD_NOLOAD: ::c_int = 0x8;
719719

720720
pub const MCL_CURRENT: ::c_int = 0x0001;
721721
pub const MCL_FUTURE: ::c_int = 0x0002;
722+
pub const MCL_ONFAULT: ::c_int = 0x0004;
722723

723724
pub const SIGSTKSZ: ::size_t = 8192;
724725
pub const MINSIGSTKSZ: ::size_t = 2048;

src/unix/linux_like/linux/gnu/b32/powerpc.rs

+1
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ pub const SOCK_DGRAM: ::c_int = 2;
293293

294294
pub const MCL_CURRENT: ::c_int = 0x2000;
295295
pub const MCL_FUTURE: ::c_int = 0x4000;
296+
pub const MCL_ONFAULT: ::c_int = 0x8000;
296297

297298
pub const POLLWRNORM: ::c_short = 0x100;
298299
pub const POLLWRBAND: ::c_short = 0x200;

src/unix/linux_like/linux/gnu/b32/riscv32/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,7 @@ pub const EISNAM: ::c_int = 120;
393393
pub const EREMOTEIO: ::c_int = 121;
394394
pub const MCL_CURRENT: ::c_int = 1;
395395
pub const MCL_FUTURE: ::c_int = 2;
396+
pub const MCL_ONFAULT: ::c_int = 4;
396397
pub const SIGSTKSZ: ::size_t = 8192;
397398
pub const MINSIGSTKSZ: ::size_t = 2048;
398399
pub const CBAUD: ::tcflag_t = 4111;

src/unix/linux_like/linux/gnu/b32/sparc/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,7 @@ pub const EREMOTEIO: ::c_int = 121;
363363

364364
pub const MCL_CURRENT: ::c_int = 0x2000;
365365
pub const MCL_FUTURE: ::c_int = 0x4000;
366+
pub const MCL_ONFAULT: ::c_int = 0x8000;
366367

367368
pub const SIGSTKSZ: ::size_t = 16384;
368369
pub const MINSIGSTKSZ: ::size_t = 4096;

src/unix/linux_like/linux/gnu/b32/x86/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,7 @@ pub const PTRACE_SYSEMU_SINGLESTEP: ::c_uint = 32;
507507

508508
pub const MCL_CURRENT: ::c_int = 0x0001;
509509
pub const MCL_FUTURE: ::c_int = 0x0002;
510+
pub const MCL_ONFAULT: ::c_int = 0x0004;
510511

511512
pub const POLLWRNORM: ::c_short = 0x100;
512513
pub const POLLWRBAND: ::c_short = 0x200;

src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ pub const EDEADLOCK: ::c_int = 35;
423423

424424
pub const MCL_CURRENT: ::c_int = 0x0001;
425425
pub const MCL_FUTURE: ::c_int = 0x0002;
426+
pub const MCL_ONFAULT: ::c_int = 0x0004;
426427

427428
pub const SIGSTKSZ: ::size_t = 16384;
428429
pub const MINSIGSTKSZ: ::size_t = 5120;

src/unix/linux_like/linux/gnu/b64/mips64/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -823,6 +823,7 @@ pub const RTLD_NOLOAD: ::c_int = 0x8;
823823

824824
pub const MCL_CURRENT: ::c_int = 0x0001;
825825
pub const MCL_FUTURE: ::c_int = 0x0002;
826+
pub const MCL_ONFAULT: ::c_int = 0x0004;
826827

827828
pub const SIGSTKSZ: ::size_t = 8192;
828829
pub const MINSIGSTKSZ: ::size_t = 2048;

src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,7 @@ pub const EREMOTEIO: ::c_int = 121;
473473

474474
pub const MCL_CURRENT: ::c_int = 0x2000;
475475
pub const MCL_FUTURE: ::c_int = 0x4000;
476+
pub const MCL_ONFAULT: ::c_int = 0x8000;
476477

477478
pub const SIGSTKSZ: ::size_t = 0x4000;
478479
pub const MINSIGSTKSZ: ::size_t = 4096;

src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,7 @@ pub const PTRACE_GETREGS: ::c_uint = 12;
432432
pub const PTRACE_SETREGS: ::c_uint = 13;
433433
pub const MCL_CURRENT: ::c_int = 1;
434434
pub const MCL_FUTURE: ::c_int = 2;
435+
pub const MCL_ONFAULT: ::c_int = 4;
435436
pub const SIGSTKSZ: ::size_t = 8192;
436437
pub const MINSIGSTKSZ: ::size_t = 2048;
437438
pub const CBAUD: ::tcflag_t = 4111;

src/unix/linux_like/linux/gnu/b64/s390x.rs

+1
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,7 @@ pub const PTRACE_DETACH: ::c_uint = 17;
481481

482482
pub const MCL_CURRENT: ::c_int = 0x0001;
483483
pub const MCL_FUTURE: ::c_int = 0x0002;
484+
pub const MCL_ONFAULT: ::c_int = 0x0004;
484485

485486
pub const EFD_NONBLOCK: ::c_int = 0x800;
486487

src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,7 @@ pub const EREMOTEIO: ::c_int = 121;
444444

445445
pub const MCL_CURRENT: ::c_int = 0x2000;
446446
pub const MCL_FUTURE: ::c_int = 0x4000;
447+
pub const MCL_ONFAULT: ::c_int = 0x8000;
447448

448449
pub const SIGSTKSZ: ::size_t = 16384;
449450
pub const MINSIGSTKSZ: ::size_t = 4096;

src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,7 @@ pub const PR_SPEC_INDIRECT_BRANCH: ::c_int = 1;
651651

652652
pub const MCL_CURRENT: ::c_int = 0x0001;
653653
pub const MCL_FUTURE: ::c_int = 0x0002;
654+
pub const MCL_ONFAULT: ::c_int = 0x0004;
654655

655656
pub const SIGSTKSZ: ::size_t = 8192;
656657
pub const MINSIGSTKSZ: ::size_t = 2048;

src/unix/linux_like/linux/musl/b32/arm/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ pub const O_LARGEFILE: ::c_int = 0o400000;
235235
pub const MADV_SOFT_OFFLINE: ::c_int = 101;
236236
pub const MCL_CURRENT: ::c_int = 0x0001;
237237
pub const MCL_FUTURE: ::c_int = 0x0002;
238+
pub const MCL_ONFAULT: ::c_int = 0x0004;
238239
pub const CBAUD: ::tcflag_t = 0o0010017;
239240
pub const TAB1: ::c_int = 0x00000800;
240241
pub const TAB2: ::c_int = 0x00001000;

src/unix/linux_like/linux/musl/b32/mips/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ pub const O_LARGEFILE: ::c_int = 0x2000;
174174

175175
pub const MCL_CURRENT: ::c_int = 0x0001;
176176
pub const MCL_FUTURE: ::c_int = 0x0002;
177+
pub const MCL_ONFAULT: ::c_int = 0x0004;
177178
pub const CBAUD: ::tcflag_t = 0o0010017;
178179
pub const TAB1: ::c_int = 0x00000800;
179180
pub const TAB2: ::c_int = 0x00001000;

src/unix/linux_like/linux/musl/b32/powerpc.rs

+1
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ pub const O_LARGEFILE: ::c_int = 0x10000;
167167

168168
pub const MCL_CURRENT: ::c_int = 0x2000;
169169
pub const MCL_FUTURE: ::c_int = 0x4000;
170+
pub const MCL_ONFAULT: ::c_int = 0x8000;
170171
pub const CBAUD: ::tcflag_t = 0o0000377;
171172
pub const TAB1: ::c_int = 0x00000400;
172173
pub const TAB2: ::c_int = 0x00000800;

src/unix/linux_like/linux/musl/b32/riscv32/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,7 @@ pub const FIONCLEX: ::c_int = 21584;
376376
pub const FIONBIO: ::c_int = 21537;
377377
pub const MCL_CURRENT: ::c_int = 1;
378378
pub const MCL_FUTURE: ::c_int = 2;
379+
pub const MCL_ONFAULT: ::c_int = 4;
379380
pub const SIGSTKSZ: ::size_t = 8192;
380381
pub const MINSIGSTKSZ: ::size_t = 2048;
381382
pub const CBAUD: ::tcflag_t = 4111;

src/unix/linux_like/linux/musl/b32/x86/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ pub const O_LARGEFILE: ::c_int = 0o0100000;
224224
pub const MADV_SOFT_OFFLINE: ::c_int = 101;
225225
pub const MCL_CURRENT: ::c_int = 0x0001;
226226
pub const MCL_FUTURE: ::c_int = 0x0002;
227+
pub const MCL_ONFAULT: ::c_int = 0x0004;
227228
pub const CBAUD: ::tcflag_t = 0o0010017;
228229
pub const TAB1: ::c_int = 0x00000800;
229230
pub const TAB2: ::c_int = 0x00001000;

src/unix/linux_like/linux/musl/b64/aarch64/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,7 @@ pub const SYS_set_mempolicy_home_node: ::c_long = 450;
567567

568568
pub const MCL_CURRENT: ::c_int = 0x0001;
569569
pub const MCL_FUTURE: ::c_int = 0x0002;
570+
pub const MCL_ONFAULT: ::c_int = 0x0004;
570571
pub const CBAUD: ::tcflag_t = 0o0010017;
571572
pub const TAB1: ::c_int = 0x00000800;
572573
pub const TAB2: ::c_int = 0x00001000;

src/unix/linux_like/linux/musl/b64/mips64.rs

+1
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,7 @@ pub const F_OFD_SETLKW: ::c_int = 38;
618618

619619
pub const MCL_CURRENT: ::c_int = 0x0001;
620620
pub const MCL_FUTURE: ::c_int = 0x0002;
621+
pub const MCL_ONFAULT: ::c_int = 0x0004;
621622

622623
pub const CBAUD: ::tcflag_t = 0o0010017;
623624
pub const TAB1: ::tcflag_t = 0x00000800;

src/unix/linux_like/linux/musl/b64/powerpc64.rs

+1
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,7 @@ pub const FLUSHO: ::tcflag_t = 0x00800000;
626626

627627
pub const MCL_CURRENT: ::c_int = 0x2000;
628628
pub const MCL_FUTURE: ::c_int = 0x4000;
629+
pub const MCL_ONFAULT: ::c_int = 0x8000;
629630
pub const CBAUD: ::tcflag_t = 0xff;
630631
pub const TAB1: ::c_int = 0x400;
631632
pub const TAB2: ::c_int = 0x800;

src/unix/linux_like/linux/musl/b64/riscv64/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,7 @@ pub const MAP_SYNC: ::c_int = 0x080000;
630630

631631
pub const MCL_CURRENT: ::c_int = 0x0001;
632632
pub const MCL_FUTURE: ::c_int = 0x0002;
633+
pub const MCL_ONFAULT: ::c_int = 0x0004;
633634
pub const CBAUD: ::tcflag_t = 0o0010017;
634635
pub const TAB1: ::c_int = 0x00000800;
635636
pub const TAB2: ::c_int = 0x00001000;

src/unix/linux_like/linux/musl/b64/s390x.rs

+1
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ pub const EXTPROC: ::tcflag_t = 0x00010000;
290290

291291
pub const MCL_CURRENT: ::c_int = 0x0001;
292292
pub const MCL_FUTURE: ::c_int = 0x0002;
293+
pub const MCL_ONFAULT: ::c_int = 0x0004;
293294

294295
pub const F_GETLK: ::c_int = 5;
295296
pub const F_GETOWN: ::c_int = 9;

src/unix/linux_like/linux/musl/b64/x86_64/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -831,6 +831,7 @@ pub const MAP_SYNC: ::c_int = 0x080000;
831831

832832
pub const MCL_CURRENT: ::c_int = 0x0001;
833833
pub const MCL_FUTURE: ::c_int = 0x0002;
834+
pub const MCL_ONFAULT: ::c_int = 0x0004;
834835
pub const CBAUD: ::tcflag_t = 0o0010017;
835836
pub const TAB1: ::c_int = 0x00000800;
836837
pub const TAB2: ::c_int = 0x00001000;

src/unix/linux_like/linux/uclibc/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ impl siginfo_t {
109109

110110
pub const MCL_CURRENT: ::c_int = 0x0001;
111111
pub const MCL_FUTURE: ::c_int = 0x0002;
112+
pub const MCL_ONFAULT: ::c_int = 0x0004;
112113

113114
pub const SIGEV_THREAD_ID: ::c_int = 4;
114115

0 commit comments

Comments
 (0)