- Fixed 6-year old thread resource bug. Thx to V.Uhlig

This commit is contained in:
Jan Stoess 2008-05-29 11:40:45 +02:00
parent 215a130460
commit d748305ae1
2 changed files with 10 additions and 3 deletions

View File

@ -1,6 +1,6 @@
/*********************************************************************
*
* Copyright (C) 2002, 2003, 2007, Karlsruhe University
* Copyright (C) 2002, 2003, 2007-2008, Karlsruhe University
*
* File path: api/v4/resources.h
* Description:
@ -69,13 +69,13 @@ public:
* Intialize resources (i.e., clear all resources).
*/
inline void init (void)
{ resource_bits = 0; }
{ resource_bits.clear(); }
/**
* Clear all resources.
*/
inline void clear (void)
{ resource_bits = 0; }
{ resource_bits.clear(); }
/**
* Add resource to resource bits.

View File

@ -49,6 +49,13 @@ public:
{ maskvalue = initvalue; }
// Modification
bitmask_t clear()
{
maskvalue = 0;
return (bitmask_t) maskvalue;
}
inline bitmask_t operator = (const int &n)
{
maskvalue = (1UL << n);