github.com/SagerNet/gvisor@v0.0.0-20210707092255-7731c139d75c/test/syscalls/linux/rseq/critical.h (about) 1 // Copyright 2019 The gVisor Authors. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 #ifndef GVISOR_TEST_SYSCALLS_LINUX_RSEQ_CRITICAL_H_ 16 #define GVISOR_TEST_SYSCALLS_LINUX_RSEQ_CRITICAL_H_ 17 18 #include "test/syscalls/linux/rseq/types.h" 19 #include "test/syscalls/linux/rseq/uapi.h" 20 21 constexpr uint32_t kRseqSignature = 0x90909090; 22 23 extern "C" { 24 25 extern void rseq_loop(struct rseq* r, struct rseq_cs* cs); 26 extern void* rseq_loop_early_abort; 27 extern void* rseq_loop_start; 28 extern void* rseq_loop_pre_commit; 29 extern void* rseq_loop_post_commit; 30 extern void* rseq_loop_abort; 31 32 extern int rseq_getpid(struct rseq* r, struct rseq_cs* cs); 33 extern void* rseq_getpid_start; 34 extern void* rseq_getpid_post_commit; 35 extern void* rseq_getpid_abort; 36 37 } // extern "C" 38 39 #endif // GVISOR_TEST_SYSCALLS_LINUX_RSEQ_CRITICAL_H_