Merge pull request #56 from Myriachan/syscalls-11_x

Add system calls for 11.3 and 11.4
This commit is contained in:
Jack
2017-06-05 11:40:00 +08:00
committed by GitHub
3 changed files with 7 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)
+2
View File
@@ -814,6 +814,8 @@ int cwav_pcm_setup(cwav_pcmstate* state, cwav_context* ctx, int isloop)
startoffset = getle32(ctx->infoheader.loopstart); startoffset = getle32(ctx->infoheader.loopstart);
else if (ctx->infoheader.encoding == CWAV_ENCODING_PCM16) else if (ctx->infoheader.encoding == CWAV_ENCODING_PCM16)
startoffset = getle32(ctx->infoheader.loopstart) * 2; startoffset = getle32(ctx->infoheader.loopstart) * 2;
else
startoffset = 0;
} }
else else
{ {
+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)
{ {