~ubuntu-branches/ubuntu/quantal/nspr/quantal-security

« back to all changes in this revision

Viewing changes to mozilla/nsprpub/pr/src/pthreads/ptthread.c

  • Committer: Bazaar Package Importer
  • Author(s): Alexander Sack
  • Date: 2009-08-10 11:34:26 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20090810113426-3uv4diflrkcbdimm
Tags: 4.8-0ubuntu1
* New upstream release: 4.8 (LP: #387812)
* adjust patches to changed upstreanm codebase
  - update debian/patches/99_configure.patch
* update shlibs symbols to include new API elements
  - update debian/libnspr4-0d.symbols

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
#include <string.h>
53
53
#include <signal.h>
54
54
 
 
55
#ifdef SYMBIAN
 
56
/* In Open C sched_get_priority_min/max do not work properly, so we undefine
 
57
 * _POSIX_THREAD_PRIORITY_SCHEDULING here.
 
58
 */
 
59
#undef _POSIX_THREAD_PRIORITY_SCHEDULING
 
60
#endif
 
61
 
55
62
/*
56
63
 * Record whether or not we have the privilege to set the scheduling
57
64
 * policy and priority of threads.  0 means that privilege is available.
1033
1040
        PR_Lock(pt_book.ml);
1034
1041
        while (pt_book.user > pt_book.this_many)
1035
1042
            PR_WaitCondVar(pt_book.cv, PR_INTERVAL_NO_TIMEOUT);
 
1043
        if (me->state & PT_THREAD_SYSTEM)
 
1044
            pt_book.system -= 1;
 
1045
        else
 
1046
            pt_book.user -= 1;
1036
1047
        PR_Unlock(pt_book.ml);
1037
1048
 
1038
1049
        _PR_CleanupMW();
1152
1163
 */
1153
1164
static void init_pthread_gc_support(void)
1154
1165
{
 
1166
#ifndef SYMBIAN
1155
1167
    PRIntn rv;
1156
1168
 
1157
1169
#if defined(_PR_DCETHREADS)
1188
1200
    }
1189
1201
#endif  /* defined(PT_NO_SIGTIMEDWAIT) */
1190
1202
#endif /* defined(_PR_DCETHREADS) */
 
1203
#endif /* SYMBIAN */
1191
1204
}
1192
1205
 
1193
1206
PR_IMPLEMENT(void) PR_SetThreadGCAble(void)
1338
1351
        while (me->suspend & PT_THREAD_SUSPENDED)
1339
1352
        {
1340
1353
#if !defined(FREEBSD) && !defined(NETBSD) && !defined(OPENBSD) \
1341
 
    && !defined(BSDI) && !defined(VMS) && !defined(UNIXWARE) \
1342
 
    && !defined(DARWIN) && !defined(RISCOS) /*XXX*/
 
1354
    && !defined(BSDI) && !defined(UNIXWARE) \
 
1355
    && !defined(DARWIN) && !defined(RISCOS) \
 
1356
    && !defined(SYMBIAN) /*XXX*/
1343
1357
        PRIntn rv;
1344
1358
            sigwait(&sigwait_set, &rv);
1345
1359
#endif
1383
1397
    PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS, 
1384
1398
           ("doing pthread_kill in pt_SuspendSet thred %p tid = %X\n",
1385
1399
           thred, thred->id));
1386
 
#if defined(VMS)
1387
 
    rv = thread_suspend(thred);
 
1400
#if defined(SYMBIAN)
 
1401
    /* All signal group functions are not implemented in Symbian OS */
 
1402
    rv = 0;
1388
1403
#else
1389
1404
    rv = pthread_kill (thred->id, SIGUSR2);
1390
1405
#endif
1439
1454
    thred->suspend &= ~PT_THREAD_SUSPENDED;
1440
1455
 
1441
1456
#if defined(PT_NO_SIGTIMEDWAIT)
1442
 
#if defined(VMS)
1443
 
        thread_resume(thred);
 
1457
#if defined(SYMBIAN) 
 
1458
        /* All signal group functions are not implemented in Symbian OS */
1444
1459
#else
1445
1460
        pthread_kill(thred->id, SIGUSR1);
1446
1461
#endif