wut/libraries/wutnewlib/wut_newlib.c

47 lines
835 B
C
Raw Normal View History

#include "wut_newlib.h"
#include <coreinit/exit.h>
2020-05-16 01:46:07 +01:00
void(*__wut_exit)(int rc);
2020-06-01 15:03:36 +01:00
extern void __fini_wut(void);
2020-05-16 01:46:07 +01:00
int __syscall_lock_init(int *lock, int recursive) {
return __wut_lock_init(lock,recursive);
}
int __syscall_lock_close(int *lock) {
return __wut_lock_close(lock);
}
int __syscall_lock_release(int *lock) {
return __wut_lock_release(lock);
}
int __syscall_lock_acquire(int *lock) {
return __wut_lock_acquire(lock);
}
2020-06-01 15:03:36 +01:00
void __syscall_exit(int rc) {
__fini_wut();
2020-05-16 01:46:07 +01:00
__wut_exit(rc);
}
int __syscall_gettod_r(struct _reent *ptr, struct timeval *tp, struct timezone *tz){
return __wut_gettod_r(ptr,tp,tz);
}
int __syscall_nanosleep(const struct timespec *req, struct timespec *rem){
return __wut_nanosleep(req, rem);
}
void
__init_wut_newlib()
{
2020-05-16 01:46:07 +01:00
__wut_exit = RPLWRAP(exit);
}
void
__fini_wut_newlib()
{
}