< prev index next >

src/share/vm/gc/shared/workgroup.hpp

Print this page

        

*** 377,420 **** // cleanup if necessary. bool all_tasks_completed(); }; // Represents a set of free small integer ids. ! class FreeIdSet : public CHeapObj<mtInternal> { enum { ! end_of_list = -1, ! claimed = -2 }; ! int _sz; Monitor* _mon; ! int* _ids; ! int _hd; ! int _waiters; ! int _claimed; ! ! static bool _safepoint; ! typedef FreeIdSet* FreeIdSetPtr; ! static const int NSets = 10; ! static FreeIdSetPtr _sets[NSets]; ! static bool _stat_init; ! int _index; public: ! FreeIdSet(int sz, Monitor* mon); ~FreeIdSet(); - static void set_safepoint(bool b); - - // Attempt to claim the given id permanently. Returns "true" iff - // successful. - bool claim_perm_id(int i); - // Returns an unclaimed parallel id (waiting for one to be released if ! // necessary). Returns "-1" if a GC wakes up a wait for an id. ! int claim_par_id(); ! void release_par_id(int id); }; #endif // SHARE_VM_GC_SHARED_WORKGROUP_HPP --- 377,407 ---- // cleanup if necessary. bool all_tasks_completed(); }; // Represents a set of free small integer ids. ! class FreeIdSet : public CHeapObj<mtGC> { enum { ! end_of_list = UINT_MAX, ! claimed = UINT_MAX - 1 }; ! uint _size; Monitor* _mon; ! uint* _ids; ! uint _hd; ! uint _waiters; ! uint _claimed; public: ! FreeIdSet(uint size, Monitor* mon); ~FreeIdSet(); // Returns an unclaimed parallel id (waiting for one to be released if ! // necessary). Returns "UINT_MAX" if a GC wakes up a wait for an id. ! uint claim_par_id(); ! void release_par_id(uint id); }; #endif // SHARE_VM_GC_SHARED_WORKGROUP_HPP
< prev index next >