Skip to content

Commit

Permalink
kernel: more judicious use of register
Browse files Browse the repository at this point in the history
  • Loading branch information
EtchedPixels committed Mar 8, 2024
1 parent c520836 commit 7127b96
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Kernel/filesys.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ inoptr srch_mt(register inoptr ino)
* inodes.
*/

inoptr i_open(uint16_t dev, uint16_t ino)
inoptr i_open(register uint16_t dev, uint16_t ino)
{
register inoptr nindex;
register inoptr j;
Expand Down
6 changes: 3 additions & 3 deletions Kernel/syscall_exec16.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
static void close_on_exec(void)
{
/* Keep the mask separate to stop SDCC generating crap code */
uint16_t m = 1U << (UFTSIZE - 1);
int8_t j;
register uint16_t m = 1U << (UFTSIZE - 1);
register int_fast8_t j;

for (j = UFTSIZE - 1; j >= 0; --j) {
if (udata.u_cloexec & m)
Expand All @@ -34,7 +34,7 @@ char *envp[];
/*
* See exec.h
*/
static int header_ok(struct exec *pp)
static int header_ok(register struct exec *pp)
{
/* Executable ? */
if (pp->a_magic != EXEC_MAGIC)
Expand Down

0 comments on commit 7127b96

Please sign in to comment.