mirror of https://github.com/l4ka/pistachio.git
- Fixed 6-year old thread resource bug. Thx to V.Uhlig
This commit is contained in:
parent
215a130460
commit
d748305ae1
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue