Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157854786
D51673.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D51673.diff
View Options
diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master
--- a/sys/kern/syscalls.master
+++ b/sys/kern/syscalls.master
@@ -51,6 +51,7 @@
; SYSMUX syscall multiplexer. No prototype, argument struct, or
; handler is declared or used. Handled in MD syscall code.
; CAPENABLED syscall is allowed in capability mode
+; NORETURN the syscall does not return
;
; To support programmatic generation of both the default ABI and 32-bit compat
; (freebsd32) we impose a number of restrictions on the types of system calls.
diff --git a/sys/tools/syscalls/core/syscall.lua b/sys/tools/syscalls/core/syscall.lua
--- a/sys/tools/syscalls/core/syscall.lua
+++ b/sys/tools/syscalls/core/syscall.lua
@@ -28,6 +28,7 @@
-- flags beyond this point are modifiers
"CAPENABLED",
"NOLIB",
+ "NORETURN",
"NOTSTATIC",
"SYSMUX",
}
diff --git a/sys/tools/syscalls/scripts/libsys_h.lua b/sys/tools/syscalls/scripts/libsys_h.lua
--- a/sys/tools/syscalls/scripts/libsys_h.lua
+++ b/sys/tools/syscalls/scripts/libsys_h.lua
@@ -76,8 +76,12 @@
for _, v in pairs(s) do
if print_decl(v) then
- gen:write(string.format("%s __sys_%s(%s);\n",
- v.ret, v.name, v.argstr_type_var))
+ local ret_attr = "";
+ if v.type.NORETURN then
+ ret_attr = "_Noreturn "
+ end
+ gen:write(string.format("%s%s __sys_%s(%s);\n",
+ ret_attr, v.ret, v.name, v.argstr_type_var))
end
end
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, May 26, 9:05 PM (1 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33538222
Default Alt Text
D51673.diff (1 KB)
Attached To
Mode
D51673: sysent: add a new NORETURN type flag
Attached
Detach File
Event Timeline
Log In to Comment