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

Unified Diff: src/shared/platform/nacl_sync_checked.c

Issue 6937003: modified nacl_sync.h to have NACL_WUR for all functions that return a (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: '' Created 9 years, 8 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/shared/platform/nacl_sync_checked.h ('k') | src/trusted/desc/nacl_desc_wrapper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/shared/platform/nacl_sync_checked.c
===================================================================
--- src/shared/platform/nacl_sync_checked.c (revision 5177)
+++ src/shared/platform/nacl_sync_checked.c (working copy)
@@ -1,7 +1,7 @@
/*
- * Copyright 2008 The Native Client Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can
- * be found in the LICENSE file.
+ * Copyright (c) 2011 The Native Client Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
*/
/*
@@ -14,6 +14,12 @@
#include "native_client/src/shared/platform/nacl_log.h"
#include "native_client/src/shared/platform/nacl_sync_checked.h"
+void NaClXMutexCtor(struct NaClMutex *mp) {
+ if (!NaClMutexCtor(mp)) {
+ NaClLog(LOG_FATAL, "NaClXMutexCtor failed\n");
+ }
+}
+
void NaClXMutexLock(struct NaClMutex *mp) {
NaClSyncStatus status;
@@ -44,6 +50,12 @@
NaClLog(LOG_FATAL, "NaClMutexUnlock returned %d\n", status);
}
+void NaClXCondVarCtor(struct NaClCondVar *cvp) {
+ if (!NaClCondVarCtor(cvp)) {
+ NaClLog(LOG_FATAL, "NaClCondVarCtor failed\n");
+ }
+}
+
void NaClXCondVarSignal(struct NaClCondVar *cvp) {
NaClSyncStatus status;
@@ -81,7 +93,7 @@
if (NACL_SYNC_OK == status || NACL_SYNC_CONDVAR_TIMEDOUT == status) {
return status;
}
- NaClLog(LOG_FATAL, "NaClCondVarTimedWait returned %d\n", status);
+ NaClLog(LOG_FATAL, "NaClCondVarTimedWaitAbsolute returned %d\n", status);
/* NOTREACHED */
return NACL_SYNC_INTERNAL_ERROR;
}
@@ -90,12 +102,12 @@
struct NaClCondVar *cvp,
struct NaClMutex *mp,
struct nacl_abi_timespec const *reltime) {
- NaClSyncStatus status = NaClCondVarTimedWaitAbsolute(cvp, mp, reltime);
+ NaClSyncStatus status = NaClCondVarTimedWaitRelative(cvp, mp, reltime);
if (NACL_SYNC_OK == status || NACL_SYNC_CONDVAR_TIMEDOUT == status) {
return status;
}
- NaClLog(LOG_FATAL, "NaClCondVarTimedWait returned %d\n", status);
+ NaClLog(LOG_FATAL, "NaClCondVarTimedWaitRelative returned %d\n", status);
/* NOTREACHED */
return NACL_SYNC_INTERNAL_ERROR;
}
« no previous file with comments | « src/shared/platform/nacl_sync_checked.h ('k') | src/trusted/desc/nacl_desc_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698