Added 11.3 and 11.4 system calls SetGpuProt and SetWifiEnabled. Also, switched from C99 to C11 to get _Static_assert.

This commit is contained in:
Myria
2017-06-03 10:15:12 -07:00
parent 7c08e895d0
commit c629eb35f1
2 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ OBJS = $(foreach dir,$(SRC_DIR),$(subst .c,.o,$(wildcard $(dir)/*.c))) $(foreach
# Compiler Settings # Compiler Settings
OUTPUT = ctrtool OUTPUT = ctrtool
CXXFLAGS = -I. CXXFLAGS = -I.
CFLAGS = -O2 -Wall -Wno-unused-variable -Wno-unused-result -I. -std=c99 CFLAGS = -O2 -Wall -Wno-unused-variable -Wno-unused-result -I. -std=c11
CC = gcc CC = gcc
CXX = g++ CXX = g++
SYS := $(shell gcc -dumpmachine) SYS := $(shell gcc -dumpmachine)
+4 -3
View File
@@ -95,8 +95,8 @@ static const char *const syscall_list[NUM_SYSCALLS] =
"StopDma", // 56 "StopDma", // 56
"GetDmaState", // 57 "GetDmaState", // 57
"RestartDma", // 58 "RestartDma", // 58
NULL, // 59 "SetGpuProt", // 59
NULL, // 5A "SetWifiEnabled", // 5A
NULL, // 5B NULL, // 5B
NULL, // 5C NULL, // 5C
NULL, // 5D NULL, // 5D
@@ -139,7 +139,8 @@ static const char *const syscall_list[NUM_SYSCALLS] =
void syscall_get_name(char *output, size_t size, unsigned int call_num) void syscall_get_name(char *output, size_t size, unsigned int call_num)
{ {
typedef char StaticAssert[sizeof(syscall_list) / sizeof(syscall_list[0]) == NUM_SYSCALLS ? 1 : -1]; _Static_assert(sizeof(syscall_list) / sizeof(syscall_list[0]) == NUM_SYSCALLS,
"syscall table length mismatch");
if (size == 0) if (size == 0)
{ {