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

Side by Side Diff: nspr/pr/src/md/unix/linux.c

Issue 2078763002: Delete bundled copy of NSS and replace with README. (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/nss@master
Patch Set: Delete bundled copy of NSS and replace with README. Created 4 years, 6 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
« no previous file with comments | « nspr/pr/src/md/unix/darwin.c ('k') | nspr/pr/src/md/unix/os_Darwin.s » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6 #include "primpl.h"
7
8 void _MD_EarlyInit(void)
9 {
10 }
11
12 PRWord *_MD_HomeGCRegisters(PRThread *t, int isCurrent, int *np)
13 {
14 #ifndef _PR_PTHREADS
15 if (isCurrent) {
16 (void) setjmp(CONTEXT(t));
17 }
18 *np = sizeof(CONTEXT(t)) / sizeof(PRWord);
19 return (PRWord *) CONTEXT(t);
20 #else
21 *np = 0;
22 return NULL;
23 #endif
24 }
25
26 #ifdef _PR_PTHREADS
27
28 extern void _MD_unix_terminate_waitpid_daemon(void);
29
30 void _MD_CleanupBeforeExit(void)
31 {
32 _MD_unix_terminate_waitpid_daemon();
33 }
34
35 #else /* ! _PR_PTHREADS */
36
37 void
38 _MD_SET_PRIORITY(_MDThread *thread, PRUintn newPri)
39 {
40 return;
41 }
42
43 PRStatus
44 _MD_InitializeThread(PRThread *thread)
45 {
46 /*
47 * set the pointers to the stack-pointer and frame-pointer words in the
48 * context structure; this is for debugging use.
49 */
50 thread->md.sp = _MD_GET_SP_PTR(thread);
51 thread->md.fp = _MD_GET_FP_PTR(thread);
52 return PR_SUCCESS;
53 }
54
55 PRStatus
56 _MD_WAIT(PRThread *thread, PRIntervalTime ticks)
57 {
58 PR_ASSERT(!(thread->flags & _PR_GLOBAL_SCOPE));
59 _PR_MD_SWITCH_CONTEXT(thread);
60 return PR_SUCCESS;
61 }
62
63 PRStatus
64 _MD_WAKEUP_WAITER(PRThread *thread)
65 {
66 if (thread) {
67 PR_ASSERT(!(thread->flags & _PR_GLOBAL_SCOPE));
68 }
69 return PR_SUCCESS;
70 }
71
72 /* These functions should not be called for Linux */
73 void
74 _MD_YIELD(void)
75 {
76 PR_NOT_REACHED("_MD_YIELD should not be called for Linux.");
77 }
78
79 PRStatus
80 _MD_CREATE_THREAD(
81 PRThread *thread,
82 void (*start) (void *),
83 PRThreadPriority priority,
84 PRThreadScope scope,
85 PRThreadState state,
86 PRUint32 stackSize)
87 {
88 PR_NOT_REACHED("_MD_CREATE_THREAD should not be called for Linux.");
89 return PR_FAILURE;
90 }
91 #endif /* ! _PR_PTHREADS */
OLDNEW
« no previous file with comments | « nspr/pr/src/md/unix/darwin.c ('k') | nspr/pr/src/md/unix/os_Darwin.s » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698