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

Side by Side Diff: src/shared/platform/nacl_sync.h

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, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/shared/platform/nacl_semaphore_test.c ('k') | src/shared/platform/nacl_sync_checked.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2008 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2011 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can 3 * Use of this source code is governed by a BSD-style license that can be
4 * be found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 /* 7 /*
8 * NaCl Server Runtime mutex and condition variable abstraction layer. 8 * NaCl Server Runtime mutex and condition variable abstraction layer.
9 * This is the host-OS-independent interface. 9 * This is the host-OS-independent interface.
10 */ 10 */
11 #ifndef NATIVE_CLIENT_SRC_SHARED_PLATFORM_NACL_SYNC_H_ 11 #ifndef NATIVE_CLIENT_SRC_SHARED_PLATFORM_NACL_SYNC_H_
12 #define NATIVE_CLIENT_SRC_SHARED_PLATFORM_NACL_SYNC_H_ 12 #define NATIVE_CLIENT_SRC_SHARED_PLATFORM_NACL_SYNC_H_
13 13
14 #include "native_client/src/include/nacl_compiler_annotations.h"
14 #include "native_client/src/include/nacl_base.h" 15 #include "native_client/src/include/nacl_base.h"
15 #include "native_client/src/trusted/service_runtime/include/machine/_types.h" 16 #include "native_client/src/trusted/service_runtime/include/machine/_types.h"
16 #include "native_client/src/trusted/service_runtime/include/sys/time.h" 17 #include "native_client/src/trusted/service_runtime/include/sys/time.h"
17 18
18 EXTERN_C_BEGIN 19 EXTERN_C_BEGIN
19 20
20 struct NaClMutex { 21 struct NaClMutex {
21 void* lock; 22 void* lock;
22 }; 23 };
23 24
(...skipping 10 matching lines...) Expand all
34 NACL_SYNC_MUTEX_INVALID, 35 NACL_SYNC_MUTEX_INVALID,
35 NACL_SYNC_MUTEX_DEADLOCK, 36 NACL_SYNC_MUTEX_DEADLOCK,
36 NACL_SYNC_MUTEX_PERMISSION, 37 NACL_SYNC_MUTEX_PERMISSION,
37 NACL_SYNC_MUTEX_INTERRUPTED, 38 NACL_SYNC_MUTEX_INTERRUPTED,
38 NACL_SYNC_CONDVAR_TIMEDOUT, 39 NACL_SYNC_CONDVAR_TIMEDOUT,
39 NACL_SYNC_CONDVAR_INTR, 40 NACL_SYNC_CONDVAR_INTR,
40 NACL_SYNC_SEM_INTERRUPTED, 41 NACL_SYNC_SEM_INTERRUPTED,
41 NACL_SYNC_SEM_RANGE_ERROR 42 NACL_SYNC_SEM_RANGE_ERROR
42 } NaClSyncStatus; 43 } NaClSyncStatus;
43 44
44 int NaClMutexCtor(struct NaClMutex *mp); /* bool success/fail */ 45 int NaClMutexCtor(struct NaClMutex *mp) NACL_WUR; /* bool success/fail */
45 46
46 void NaClMutexDtor(struct NaClMutex *mp); 47 void NaClMutexDtor(struct NaClMutex *mp);
47 48
48 NaClSyncStatus NaClMutexLock(struct NaClMutex *mp); 49 NaClSyncStatus NaClMutexLock(struct NaClMutex *mp) NACL_WUR;
49 50
50 NaClSyncStatus NaClMutexTryLock(struct NaClMutex *mp); 51 NaClSyncStatus NaClMutexTryLock(struct NaClMutex *mp) NACL_WUR;
51 52
52 NaClSyncStatus NaClMutexUnlock(struct NaClMutex *mp); 53 NaClSyncStatus NaClMutexUnlock(struct NaClMutex *mp) NACL_WUR;
53 54
54 55
55 int NaClCondVarCtor(struct NaClCondVar *cvp); 56 int NaClCondVarCtor(struct NaClCondVar *cvp) NACL_WUR;
56 57
57 void NaClCondVarDtor(struct NaClCondVar *cvp); 58 void NaClCondVarDtor(struct NaClCondVar *cvp);
58 59
59 NaClSyncStatus NaClCondVarSignal(struct NaClCondVar *cvp); 60 NaClSyncStatus NaClCondVarSignal(struct NaClCondVar *cvp) NACL_WUR;
60 61
61 NaClSyncStatus NaClCondVarBroadcast(struct NaClCondVar *cvp); 62 NaClSyncStatus NaClCondVarBroadcast(struct NaClCondVar *cvp) NACL_WUR;
62 63
63 NaClSyncStatus NaClCondVarWait(struct NaClCondVar *cvp, 64 NaClSyncStatus NaClCondVarWait(struct NaClCondVar *cvp,
64 struct NaClMutex *mp); 65 struct NaClMutex *mp) NACL_WUR;
65 66
66 NaClSyncStatus NaClCondVarTimedWaitRelative( 67 NaClSyncStatus NaClCondVarTimedWaitRelative(
67 struct NaClCondVar *cvp, 68 struct NaClCondVar *cvp,
68 struct NaClMutex *mp, 69 struct NaClMutex *mp,
69 struct nacl_abi_timespec const *reltime); 70 struct nacl_abi_timespec const *reltime) NACL_WUR;
70 71
71 NaClSyncStatus NaClCondVarTimedWaitAbsolute( 72 NaClSyncStatus NaClCondVarTimedWaitAbsolute(
72 struct NaClCondVar *cvp, 73 struct NaClCondVar *cvp,
73 struct NaClMutex *mp, 74 struct NaClMutex *mp,
74 struct nacl_abi_timespec const *abstime); 75 struct nacl_abi_timespec const *abstime) NACL_WUR;
75 76
76 77
77 78
78 EXTERN_C_END 79 EXTERN_C_END
79 80
80 81
81 #endif /* NATIVE_CLIENT_SRC_SHARED_PLATFORM_NACL_SYNC_H_ */ 82 #endif /* NATIVE_CLIENT_SRC_SHARED_PLATFORM_NACL_SYNC_H_ */
OLDNEW
« no previous file with comments | « src/shared/platform/nacl_semaphore_test.c ('k') | src/shared/platform/nacl_sync_checked.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698