nsprpub/pr/src/md/unix/dgux.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 /*
     9  * using only NSPR threads here
    10  *
    11  *  Copied from the UnixWare implementation.  Should be kept in sync
    12  *  with ../../../include/md/_dgux.h.
    13  */
    15 #include <setjmp.h>
    17 void _MD_EarlyInit(void)
    18 {
    19 }
    21 PRWord *_MD_HomeGCRegisters(PRThread *t, int isCurrent, int *np)
    22 {
    23     if (isCurrent) {
    24         (void) setjmp(CONTEXT(t));
    25     }
    26     *np = sizeof(CONTEXT(t)) / sizeof(PRWord);
    27     return (PRWord *) CONTEXT(t);
    28 }
    30 void
    31 _MD_SET_PRIORITY(_MDThread *thread, PRUintn newPri)
    32 {
    33     return;
    34 }
    36 PRStatus
    37 _MD_InitializeThread(PRThread *thread)
    38 {
    39     return PR_SUCCESS;
    40 }
    42 PRStatus
    43 _MD_WAIT(PRThread *thread, PRIntervalTime ticks)
    44 {
    45     PR_ASSERT(!(thread->flags & _PR_GLOBAL_SCOPE));
    46     _PR_MD_SWITCH_CONTEXT(thread);
    47     return PR_SUCCESS;
    48 }
    50 PRStatus
    51 _MD_WAKEUP_WAITER(PRThread *thread)
    52 {
    53     if (thread) {
    54         PR_ASSERT(!(thread->flags & _PR_GLOBAL_SCOPE));
    55     }
    56     return PR_SUCCESS;
    57 }
    59 /* These functions should not be called for DG/UX */
    60 void
    61 _MD_YIELD(void)
    62 {
    63     PR_NOT_REACHED("_MD_YIELD should not be called for DG/UX.");
    64 }
    66 PRStatus
    67 _MD_CREATE_THREAD(
    68     PRThread *thread,
    69     void (*start) (void *),
    70     PRThreadPriority priority,
    71     PRThreadScope scope,
    72     PRThreadState state,
    73     PRUint32 stackSize)
    74 {
    75     PR_NOT_REACHED("_MD_CREATE_THREAD should not be called for DG/UX.");
    76 }

mercurial