Skip to content

Commit

Permalink
Rename _Exit to KExit to avoid conflicts with _Exit from POSIX
Browse files Browse the repository at this point in the history
  • Loading branch information
fjtrujy committed May 31, 2022
1 parent 325ad94 commit 00a4a9a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ee/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ifeq ($(KERNEL_NO_PATCHES),1)
ISUSPEND_THREAD_SYSCALL = iSuspendThread.o
TLB_SYSCALLS =
else
EXEC_SYSCALLS = _Exit.o _LoadExecPS2.o _ExecPS2.o
EXEC_SYSCALLS = KExit.o _LoadExecPS2.o _ExecPS2.o
EXECOSD_SYSCALL = _ExecOSD.o
ALARM_SYSCALLS = _SetAlarm.o SetAlarm.o _ReleaseAlarm.o ReleaseAlarm.o
ALARM_INTR_SYSCALLS = _iSetAlarm.o iSetAlarm.o _iReleaseAlarm.o iReleaseAlarm.o
Expand Down
2 changes: 1 addition & 1 deletion ee/kernel/include/kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ void iInvalidDCache(void *start, void *end);
/* System call prototypes */
void ResetEE(u32 init_bitfield);
void SetGsCrt(s16 interlace, s16 pal_ntsc, s16 field);
void _Exit(s32 exit_code) __attribute__((noreturn));
void KExit(s32 exit_code) __attribute__((noreturn));
void _LoadExecPS2(const char *filename, s32 num_args, char *args[]) __attribute__((noreturn));
s32 _ExecPS2(void *entry, void *gp, int num_args, char *args[]);
void RFU009(u32 arg0, u32 arg1);
Expand Down
2 changes: 1 addition & 1 deletion ee/kernel/include/syscallnr.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#define __NR_ResetEE 1
#define __NR_SetGsCrt 2
#define __NR__Exit 4
#define __NR_KExit 4
#define __NR_ResumeIntrDispatch 5 // Arbitrarily named
#define __NR__LoadExecPS2 6
#define __NR__ExecPS2 7
Expand Down
2 changes: 1 addition & 1 deletion ee/kernel/src/exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const char *SetArg(const char *filename, int argc, char *argv[])
void Exit(s32 exit_code)
{
TerminateLibrary();
_Exit(exit_code);
KExit(exit_code);
}
#endif

Expand Down
6 changes: 3 additions & 3 deletions ee/kernel/src/kernel.S
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ SYSCALL(SetGsCrt)
#ifdef KERNEL_NO_PATCHES

#ifdef F_Exit
SYSCALL_SPECIAL(Exit, _Exit)
SYSCALL_SPECIAL(Exit, KExit)
#endif

#ifdef F_LoadExecPS2
Expand All @@ -113,8 +113,8 @@ SYSCALL_SPECIAL(ExecPS2, _ExecPS2)

#else /* KERNEL_NO_PATCHES */

#ifdef F__Exit
SYSCALL(_Exit)
#ifdef F_KExit
SYSCALL(KExit)
#endif

#ifdef F__LoadExecPS2
Expand Down

0 comments on commit 00a4a9a

Please sign in to comment.