nsprpub/pr/src/md/unix/osf1.c

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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/. */
     6 #include "primpl.h"
     8 void _MD_EarlyInit(void)
     9 {
    10 }
    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 }
    26 #ifndef _PR_PTHREADS
    27 void
    28 _MD_SET_PRIORITY(_MDThread *thread, PRUintn newPri)
    29 {
    30     return;
    31 }
    33 PRStatus
    34 _MD_InitializeThread(PRThread *thread)
    35 {
    36 	return PR_SUCCESS;
    37 }
    39 PRStatus
    40 _MD_WAIT(PRThread *thread, PRIntervalTime ticks)
    41 {
    42     PR_ASSERT(!(thread->flags & _PR_GLOBAL_SCOPE));
    43     _PR_MD_SWITCH_CONTEXT(thread);
    44     return PR_SUCCESS;
    45 }
    47 PRStatus
    48 _MD_WAKEUP_WAITER(PRThread *thread)
    49 {
    50     if (thread) {
    51 	PR_ASSERT(!(thread->flags & _PR_GLOBAL_SCOPE));
    52     }
    53     return PR_SUCCESS;
    54 }
    56 /* These functions should not be called for OSF1 */
    57 void
    58 _MD_YIELD(void)
    59 {
    60     PR_NOT_REACHED("_MD_YIELD should not be called for OSF1.");
    61 }
    63 PRStatus
    64 _MD_CREATE_THREAD(
    65     PRThread *thread,
    66     void (*start) (void *),
    67     PRThreadPriority priority,
    68     PRThreadScope scope,
    69     PRThreadState state,
    70     PRUint32 stackSize)
    71 {
    72     PR_NOT_REACHED("_MD_CREATE_THREAD should not be called for OSF1.");
    73 	return PR_FAILURE;
    74 }
    75 #endif /* ! _PR_PTHREADS */

mercurial