nsprpub/pr/src/bthreads/btmisc.c

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/nsprpub/pr/src/bthreads/btmisc.c	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,72 @@
     1.4 +/* -*- Mode: C++; c-basic-offset: 4 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#include "primpl.h"
    1.10 +#include <stdio.h>
    1.11 +
    1.12 +// void _PR_InitCPUs(void) {PT_LOG("_PR_InitCPUs")}
    1.13 +// void _MD_StartInterrupts(void) {PT_LOG("_MD_StartInterrupts")}
    1.14 +
    1.15 +/* this is a total hack.. */
    1.16 +
    1.17 +struct protoent* getprotobyname(const char* name)
    1.18 +{
    1.19 +    return 0;
    1.20 +}
    1.21 +
    1.22 +struct protoent* getprotobynumber(int number)
    1.23 +{
    1.24 +    return 0;
    1.25 +}
    1.26 +
    1.27 +/* this is needed by prinit for some reason */
    1.28 +void
    1.29 +_PR_InitStacks (void)
    1.30 +{
    1.31 +}
    1.32 +
    1.33 +/* this is needed by prinit for some reason */
    1.34 +void
    1.35 +_PR_InitTPD (void)
    1.36 +{
    1.37 +}
    1.38 +
    1.39 +/*
    1.40 +** Create extra virtual processor threads. Generally used with MP systems.
    1.41 +*/
    1.42 +PR_IMPLEMENT(void)
    1.43 +    PR_SetConcurrency (PRUintn numCPUs)
    1.44 +{
    1.45 +}
    1.46 +
    1.47 +/*
    1.48 +** Set thread recycle mode to on (1) or off (0)
    1.49 +*/
    1.50 +PR_IMPLEMENT(void)
    1.51 +    PR_SetThreadRecycleMode (PRUint32 flag)
    1.52 +{
    1.53 +}
    1.54 +
    1.55 +/*
    1.56 +** Get context registers, return with error for now.
    1.57 +*/
    1.58 +
    1.59 +PR_IMPLEMENT(PRWord *)
    1.60 +_MD_HomeGCRegisters( PRThread *t, int isCurrent, int *np )
    1.61 +{
    1.62 +     return 0;
    1.63 +}
    1.64 +
    1.65 +PR_IMPLEMENT(void *)
    1.66 +PR_GetSP( PRThread *t )
    1.67 +{
    1.68 +    return 0;
    1.69 +}
    1.70 +
    1.71 +PR_IMPLEMENT(PRStatus)
    1.72 +PR_EnumerateThreads( PREnumerator func, void *arg )
    1.73 +{
    1.74 +    return PR_FAILURE;
    1.75 +}

mercurial