~ubuntu-branches/ubuntu/saucy/nspr/saucy-updates

« back to all changes in this revision

Viewing changes to mozilla/nsprpub/pr/src/bthreads/btmon.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:
211
211
    return( PR_SUCCESS );
212
212
}
213
213
 
 
214
/*
 
215
** Return the number of times that the current thread has entered the
 
216
** lock. Returns zero if the current thread has not entered the lock.
 
217
*/
214
218
PR_IMPLEMENT(PRIntn)
215
219
    PR_GetMonitorEntryCount(PRMonitor *mon)
216
220
{
217
 
    return( mon->entryCount );
 
221
    return( (mon->cvar->lock->owner == find_thread( NULL )) ?
 
222
            mon->entryCount : 0 );
218
223
}
219
224
 
 
225
/*
 
226
** If the current thread is in |mon|, this assertion is guaranteed to
 
227
** succeed.  Otherwise, the behavior of this function is undefined.
 
228
*/
 
229
PR_IMPLEMENT(void)
 
230
    PR_AssertCurrentThreadInMonitor(PRMonitor *mon)
 
231
{
 
232
    PR_ASSERT_CURRENT_THREAD_OWNS_LOCK(mon->cvar->lock);
 
233
}