Compare commits
3 Commits
a1b3d4efa4
...
9694d1a5a0
Author | SHA1 | Date | |
---|---|---|---|
9694d1a5a0 | |||
e245ecca3c | |||
3f0231be3f |
@ -11,7 +11,7 @@ int32_t SYSCALL0(sys_schedrelease) {
|
||||
Proc *proc = PROCS.current;
|
||||
spinlock_release(&PROCS.spinlock);
|
||||
|
||||
/* proc_sched((void *)frame); */
|
||||
proc_sched((void *)frame);
|
||||
|
||||
return E_OK;
|
||||
}
|
||||
|
@ -1,25 +0,0 @@
|
||||
#ifndef ULIB_MACHINE_LIMITS_H_
|
||||
#define ULIB_MACHINE_LIMITS_H_
|
||||
|
||||
#define CHAR_BIT (8)
|
||||
#define SHORT_BIT (16)
|
||||
#define WCHAR_BIT (16)
|
||||
#define INT_BIT (32)
|
||||
#define LONG_LONG_BIT (64)
|
||||
#define SCHAR_MIN (-128)
|
||||
#define SCHAR_MAX (127)
|
||||
#define UCHAR_MAX (255)
|
||||
#define SHRT_MIN (-32768)
|
||||
#define SHRT_MAX (32767)
|
||||
#define USHRT_MAX (65535)
|
||||
#define INT_MIN (-2147483648)
|
||||
#define INT_MAX (2147483647)
|
||||
#define UINT_MAX (4294967295U)
|
||||
#define LONG_MAX (2147483647L)
|
||||
#define LONG_MIN (-2147483648L)
|
||||
#define ULONG_MAX (18446744073709551615UL)
|
||||
#define LLONG_MAX (9223372036854775807LL)
|
||||
#define LLONG_MIN (-9223372036854775808LL)
|
||||
#define ULLONG_MAX (18446744073709551615ULL)
|
||||
|
||||
#endif // ULIB_MACHINE_LIMITS_H_
|
@ -1,6 +0,0 @@
|
||||
#ifndef ULIB_STD_LIMITS_H_
|
||||
#define ULIB_STD_LIMITS_H_
|
||||
|
||||
#include <machine/limits.h>
|
||||
|
||||
#endif // ULIB_STD_LIMITS_H_
|
@ -1,17 +0,0 @@
|
||||
#ifndef ULIB_STD_STDLIB_H_
|
||||
#define ULIB_STD_STDLIB_H_
|
||||
|
||||
#include <uprintf.h>
|
||||
#include <string/conv.h>
|
||||
|
||||
#define printf uprintf
|
||||
#define sprintf usprintf
|
||||
#define vsprintf uvsprintf
|
||||
#define snprintf usnprintf
|
||||
#define vsnprintf uvsnprintf
|
||||
#define vprintf uvprintf
|
||||
|
||||
#define strtoul string_conv_strtoul
|
||||
#define strtol string_conv_strtol
|
||||
|
||||
#endif // ULIB_STD_STDLIB_H_
|
@ -1,8 +1,8 @@
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <machine/limits.h>
|
||||
#include <string/char.h>
|
||||
#include <uprintf.h>
|
||||
#include <limits.h>
|
||||
|
||||
// https://android.googlesource.com/platform/bionic/+/ics-mr0/libc/stdlib/strtoul.c
|
||||
unsigned long string_conv_strtoul(const char *nptr, char **endptr, int base)
|
||||
|
25
ulib/ulib.h
Normal file
25
ulib/ulib.h
Normal file
@ -0,0 +1,25 @@
|
||||
#ifndef ULIB_ULIB_H_
|
||||
#define ULIB_ULIB_H_
|
||||
|
||||
#include <ansiq/all.h>
|
||||
#include <args/args.h>
|
||||
#include <dlmalloc/malloc.h>
|
||||
#include <string/string.h>
|
||||
#include <string/char.h>
|
||||
#include <sync/spinlock.h>
|
||||
#include <syscall/syscall.h>
|
||||
#include <system/system.h>
|
||||
#include <util/util.h>
|
||||
#include <uprintf.h>
|
||||
#include <linklist.h>
|
||||
#include <log.h>
|
||||
|
||||
#include <errors.h>
|
||||
#include <sysdefs/ioctl.h>
|
||||
#include <sysdefs/ipcpipe.h>
|
||||
#include <sysdefs/mman.h>
|
||||
#include <sysdefs/processctl.h>
|
||||
#include <sysdefs/sched.h>
|
||||
#include <sysdefs/syscall.h>
|
||||
|
||||
#endif // ULIB_ULIB_H_
|
@ -1,14 +1,5 @@
|
||||
#include <stdint.h>
|
||||
#include <string/string.h>
|
||||
#include <system/system.h>
|
||||
#include <sysdefs/ipcpipe.h>
|
||||
#include <sysdefs/processctl.h>
|
||||
#include <uprintf.h>
|
||||
#include <ansiq/all.h>
|
||||
#include <string/char.h>
|
||||
#include <util/util.h>
|
||||
#include <dlmalloc/malloc.h>
|
||||
#include <errors.h>
|
||||
#include <ulib.h>
|
||||
|
||||
uint64_t PID;
|
||||
|
||||
|
@ -1,13 +1,6 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <system/system.h>
|
||||
#include <sysdefs/processctl.h>
|
||||
#include <util/util.h>
|
||||
#include <errors.h>
|
||||
#include <uprintf.h>
|
||||
#include <string/string.h>
|
||||
#include <dlmalloc/malloc.h>
|
||||
#include <args/args.h>
|
||||
#include <ulib.h>
|
||||
#include "ls.h"
|
||||
#include "macros.h"
|
||||
|
||||
|
@ -1,8 +1,6 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <uprintf.h>
|
||||
#include <args/args.h>
|
||||
#include <string/string.h>
|
||||
#include <ulib.h>
|
||||
#include "ls.h"
|
||||
|
||||
void main(void) {
|
||||
|
@ -1,15 +1,6 @@
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
#include <util/util.h>
|
||||
#include <string/string.h>
|
||||
#include <string/char.h>
|
||||
#include <linklist.h>
|
||||
#include <dlmalloc/malloc.h>
|
||||
#include <system/system.h>
|
||||
#include <sysdefs/processctl.h>
|
||||
#include <sysdefs/ipcpipe.h>
|
||||
#include <uprintf.h>
|
||||
#include <errors.h>
|
||||
#include <ulib.h>
|
||||
#include "interp.h"
|
||||
#include "runtime.h"
|
||||
|
||||
|
@ -1,18 +1,6 @@
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <uprintf.h>
|
||||
#include <args/args.h>
|
||||
#include <string/string.h>
|
||||
#include <string/char.h>
|
||||
#include <log.h>
|
||||
#include <ansiq/all.h>
|
||||
#include <system/system.h>
|
||||
#include <sysdefs/ipcpipe.h>
|
||||
#include <sysdefs/ioctl.h>
|
||||
#include <sysdefs/processctl.h>
|
||||
#include <dlmalloc/malloc.h>
|
||||
#include <errors.h>
|
||||
#include <util/util.h>
|
||||
#include <ulib.h>
|
||||
#include "interp.h"
|
||||
|
||||
// keys
|
||||
@ -134,8 +122,6 @@ void do_mode_interactive(void) {
|
||||
linebuf[cursor++] = b;
|
||||
uprintf("%c", b);
|
||||
}
|
||||
} else {
|
||||
schedrelease();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,6 @@
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
#include <linklist.h>
|
||||
#include <dlmalloc/malloc.h>
|
||||
#include <string/string.h>
|
||||
#include <uprintf.h>
|
||||
#include <ulib.h>
|
||||
#include "runtime.h"
|
||||
#include "interp.h"
|
||||
|
||||
|
Reference in New Issue
Block a user