dgux.c (1477B)
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 /* 9 * using only NSPR threads here 10 * 11 */ 12 13 #include <setjmp.h> 14 15 void _MD_EarlyInit(void) {} 16 17 PRWord* _MD_HomeGCRegisters(PRThread* t, int isCurrent, int* np) { 18 if (isCurrent) { 19 (void)setjmp(CONTEXT(t)); 20 } 21 *np = sizeof(CONTEXT(t)) / sizeof(PRWord); 22 return (PRWord*)CONTEXT(t); 23 } 24 25 void _MD_SET_PRIORITY(_MDThread* thread, PRUintn newPri) { return; } 26 27 PRStatus _MD_InitializeThread(PRThread* thread) { return PR_SUCCESS; } 28 29 PRStatus _MD_WAIT(PRThread* thread, PRIntervalTime ticks) { 30 PR_ASSERT(!(thread->flags & _PR_GLOBAL_SCOPE)); 31 _PR_MD_SWITCH_CONTEXT(thread); 32 return PR_SUCCESS; 33 } 34 35 PRStatus _MD_WAKEUP_WAITER(PRThread* thread) { 36 if (thread) { 37 PR_ASSERT(!(thread->flags & _PR_GLOBAL_SCOPE)); 38 } 39 return PR_SUCCESS; 40 } 41 42 /* These functions should not be called for DG/UX */ 43 void _MD_YIELD(void) { 44 PR_NOT_REACHED("_MD_YIELD should not be called for DG/UX."); 45 } 46 47 PRStatus _MD_CREATE_THREAD(PRThread* thread, void (*start)(void*), 48 PRThreadPriority priority, PRThreadScope scope, 49 PRThreadState state, PRUint32 stackSize) { 50 PR_NOT_REACHED("_MD_CREATE_THREAD should not be called for DG/UX."); 51 }