A long long time ago the register keyword told the compiler to store the corresponding variable in a CPU register, but it is not relevant for any compiler used in the FreeBSD world today.
Details
- Reviewers
kib cem jhb sbruno emaste - Group Reviewers
Intel Networking - Commits
- rS331643: MFC r314568 (by emaste):
rS318389: Remove register keyword from sys/ and ANSIfy prototypes
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
I did not - this is a collection of changes that have been sitting in various WIP trees of mine for ages, through a combination of manual changes and set etc.
sys/kern/kern_clock.c | ||
---|---|---|
392–394 | didn't feel like ANSIfying these too? :) |
sys/amd64/include/xen/hypercall.h | ||
---|---|---|
112 ↗ | (On Diff #26799) | hypercall.h changes will be omitted, the register keyword is required for the __asm__("r10"). |
sys/kern/kern_clock.c | ||
---|---|---|
392–394 | hrm, missed these. Updated in my tree. |
sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h | ||
---|---|---|
391 | It would seem worth trying to upstream the sys/cddl/contrib changes or otherwise dropping them. | |
sys/ddb/db_access.c | ||
59–60 | Missed this 'register'. | |
sys/ddb/db_sym.c | ||
292 | Missed this 'register'. | |
369–370 | Missed this 'register'. | |
sys/kern/sysv_msg.c | ||
768–769 | ANSIfy? | |
sys/kern/vfs_mount.c | ||
368 | Maybe follow the more typical '#ifndef _SYSPROTO_H_' format rather than doing this type of custom comment? | |
sys/kern/vfs_syscalls.c | ||
1549 | Use SYS_SYSPROTO_H here as well. | |
2357 | SYS_SYSPROTO_H |
sys/kern/vfs_syscalls.c | ||
---|---|---|
1555 | leftover will be deleted |
A note for posterity: I compared object files built with/without this patch. There were 8 files with differences, and those differences were due to __LINE__ being passed to mtx_lock or similar.
- kern_clock.o
- kern.exec.o
- sys_machdep.o
- sysv_msg.o
- vfs_mount.o
- vfs_syscalls.o
- vfs_vnops.o
- vm_machdep.o