| Index: src/trusted/service_runtime/linux/thread_suspension.c
|
| diff --git a/src/trusted/service_runtime/linux/thread_suspension.c b/src/trusted/service_runtime/linux/thread_suspension.c
|
| index ee4bda227928b47524dc0be0a87af0ee0fd8ef52..64035481c27ea11a58cfddf37d4c46d9434db1ef 100644
|
| --- a/src/trusted/service_runtime/linux/thread_suspension.c
|
| +++ b/src/trusted/service_runtime/linux/thread_suspension.c
|
| @@ -245,3 +245,29 @@ void NaClUntrustedThreadsResumeAll(struct NaClApp *nap) {
|
|
|
| NaClXMutexUnlock(&nap->threads_mu);
|
| }
|
| +
|
| +
|
| +void NaClUntrustedThreadsSuspendAll2(struct NaClApp *nap, struct NaClAppThread *signaled_natp) {
|
| + size_t index;
|
| +
|
| + NaClXMutexLock(&nap->threads_mu);
|
| +
|
| + for (index = 0; index < nap->threads.num_entries; index++) {
|
| + struct NaClAppThread *natp = NaClGetThreadMu(nap, (int) index);
|
| + if (natp != NULL && natp != signaled_natp) {
|
| + NaClUntrustedThreadSuspend(natp, 1/*save_registers*/);
|
| + }
|
| + }
|
| +}
|
| +
|
| +void NaClUntrustedThreadsResumeAll2(struct NaClApp *nap, struct NaClAppThread *signaled_natp) {
|
| + size_t index;
|
| + for (index = 0; index < nap->threads.num_entries; index++) {
|
| + struct NaClAppThread *natp = NaClGetThreadMu(nap, (int) index);
|
| + if (natp != NULL && natp != signaled_natp) {
|
| + NaClUntrustedThreadResume(natp);
|
| + }
|
| + }
|
| +
|
| + NaClXMutexUnlock(&nap->threads_mu);
|
| +}
|
|
|