Page MenuHomeFreeBSD

Regularize the declaration of the exit syscall.
AbandonedPublic

Authored by brooks on May 31 2018, 6:41 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 27 2024, 7:30 AM
Unknown Object (File)
Jan 1 2024, 4:51 AM
Unknown Object (File)
Dec 28 2023, 5:28 PM
Unknown Object (File)
Dec 20 2023, 3:41 AM
Unknown Object (File)
Nov 26 2023, 11:26 PM
Unknown Object (File)
Nov 15 2023, 8:32 PM
Unknown Object (File)
Nov 14 2023, 10:07 PM
Unknown Object (File)
Nov 10 2023, 5:43 AM
Subscribers
None

Details

Reviewers
emaste
kib
imp
Summary

Rather than naming the syscall implementation sys_sys_exit and declaring it
to return void (it doesn't return), name it sys_exit(), and declare it to
return int. Because exit1() is marked __dead2, clang and gcc are both
fine with this change.

This syscall should be _exit(), but that would cause the SYS_exit
definition to be lost and it is widely used in the base system.

This effectively reverts r63986 and r64001 which were obsoleted by r225617.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 21376
Build 20702: arc lint + arc unit

Event Timeline

I'm starting a sweep through syscalls.master and attempting to reduce the use of alternative function and argument names as well as return types. My hope is to eliminate the need for them, but I'm working on it as a background task so doing them one at a time.

The syscall is _exit or _Exit, not exit.

In D15637#330341, @kib wrote:

The syscall is _exit or _Exit, not exit.

Unfortunately, that doesn't result in SYS_exit being declared in sys/syscall.h which would be far too disruptive.

This effectively reverts rS63986 and rS64001 which were obsoleted by rS225617.

sys/kern/capabilities.conf
32

What about compat/freebsd32/capabilities.conf ?

  • Don't export unused __sys_exit symbol.
  • Update compat/freebsd32/capabilities.conf.
lib/libthr/thread/thr_private.h
900 ↗(On Diff #43251)

Can you commit this chunk and perhaps removal of __sys_exit from FBSDPrivate_1.0 namespace separately ?

This revision is now accepted and ready to land.Dec 5 2018, 6:13 PM
brooks retitled this revision from Regularize the decleration of the exit syscall. to Regularize the declaration of the exit syscall..Dec 5 2018, 6:19 PM
sys/kern/kern_exit.c
171–172

syscall master has void, but you changed to int, why?

brooks added inline comments.
sys/kern/kern_exit.c
171–172

syscalls.master had int in it originally and I lost it in the rebase. I've restored it.

brooks marked an inline comment as done.
  • Pretend we return an int (we don't return).
This revision now requires review to proceed.Dec 5 2018, 6:52 PM