Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(744)

Unified Diff: src/trusted/service_runtime/win/nacl_syscall_impl.c

Issue 23710020: Deduplicates NaClSysSysconf implementation (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Code review feedback Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/trusted/service_runtime/posix/nacl_syscall_impl.c ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/trusted/service_runtime/win/nacl_syscall_impl.c
diff --git a/src/trusted/service_runtime/win/nacl_syscall_impl.c b/src/trusted/service_runtime/win/nacl_syscall_impl.c
index f775302bc1de688eef5b56c51548a9163f461259..01ff6c60d70d1827cb9e5735e24e45a1f0a40085 100644
--- a/src/trusted/service_runtime/win/nacl_syscall_impl.c
+++ b/src/trusted/service_runtime/win/nacl_syscall_impl.c
@@ -92,50 +92,3 @@ int32_t NaClSysClock(struct NaClAppThread *natp) {
*/
return retval;
}
-
-int32_t NaClSysSysconf(struct NaClAppThread *natp,
- int32_t name,
- int32_t *result) {
- int32_t retval = -NACL_ABI_EINVAL;
- static int32_t number_of_workers = 0;
- int32_t result_value;
-
- NaClLog(3,
- ("Entered NaClSysSysconf(%08"NACL_PRIxPTR
- "x, %d, 0x%08"NACL_PRIxPTR")\n"),
- (uintptr_t) natp, name, (uintptr_t) result);
-
- switch (name) {
- case NACL_ABI__SC_NPROCESSORS_ONLN: {
- if (0 == number_of_workers) {
- SYSTEM_INFO si;
- GetSystemInfo(&si);
- number_of_workers = (int32_t) si.dwNumberOfProcessors;
- }
- result_value = number_of_workers;
- break;
- }
- case NACL_ABI__SC_SENDMSG_MAX_SIZE: {
- /* TODO(sehr,bsy): this value needs to be determined at run time. */
- const int32_t kImcSendMsgMaxSize = 1 << 16;
- result_value = kImcSendMsgMaxSize;
- break;
- }
- case NACL_ABI__SC_PAGESIZE: {
- result_value = 1 << 16; /* always 64k pages */
- break;
- }
- default: {
- retval = -NACL_ABI_EINVAL;
- goto cleanup;
- }
- }
- if (!NaClCopyOutToUser(natp->nap, (uintptr_t) result, &result_value,
- sizeof result_value)) {
- retval = -NACL_ABI_EFAULT;
- goto cleanup;
- }
- retval = 0;
-cleanup:
- return retval;
-}
« no previous file with comments | « src/trusted/service_runtime/posix/nacl_syscall_impl.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698