chore:keep origin c format

This commit is contained in:
luoliwoshang
2025-06-11 20:30:44 +08:00
parent efabdf27c8
commit 4f5c95045d
7 changed files with 41 additions and 26 deletions

View File

@@ -9,6 +9,8 @@ struct fcntl_ret
int32_t err; // Error code
};
extern "C" {
// llgo_fcntl implements the fcntl system call wrapper for Go
// fd: file descriptor
// cmd: fcntl command
@@ -30,4 +32,6 @@ struct fcntl_ret llgo_fcntl2(int32_t fd, int32_t cmd, int32_t arg)
}
return ret;
}
}
}

View File

@@ -2,11 +2,13 @@
extern "C" {
int llgo_maxprocs() {
int llgo_maxprocs()
{
#ifdef _SC_NPROCESSORS_ONLN
return (int)sysconf(_SC_NPROCESSORS_ONLN);
#else
return 1;
#endif
}
}
}