< prev index next >
src/os/bsd/vm/os_bsd.hpp
Print this page
*** 112,122 ****
static void set_signal_handler(int, bool);
static bool is_sig_ignored(int sig);
static sigset_t* unblocked_signals();
static sigset_t* vm_signals();
- static sigset_t* allowdebug_blocked_signals();
// For signal-chaining
static struct sigaction *get_chained_signal_action(int sig);
static bool chained_handler(int sig, siginfo_t* siginfo, void* context);
--- 112,121 ----
*** 166,224 ****
}
}
static int get_node_by_cpu(int cpu_id);
};
-
- class PlatformEvent : public CHeapObj<mtInternal> {
- private:
- double CachePad[4]; // increase odds that _mutex is sole occupant of cache line
- volatile int _Event;
- volatile int _nParked;
- pthread_mutex_t _mutex[1];
- pthread_cond_t _cond[1];
- double PostPad[2];
- Thread * _Assoc;
-
- public: // TODO-FIXME: make dtor private
- ~PlatformEvent() { guarantee(0, "invariant"); }
-
- public:
- PlatformEvent() {
- int status;
- status = pthread_cond_init(_cond, NULL);
- assert_status(status == 0, status, "cond_init");
- status = pthread_mutex_init(_mutex, NULL);
- assert_status(status == 0, status, "mutex_init");
- _Event = 0;
- _nParked = 0;
- _Assoc = NULL;
- }
-
- // Use caution with reset() and fired() -- they may require MEMBARs
- void reset() { _Event = 0; }
- int fired() { return _Event; }
- void park();
- void unpark();
- int park(jlong millis);
- void SetAssociation(Thread * a) { _Assoc = a; }
- };
-
- class PlatformParker : public CHeapObj<mtInternal> {
- protected:
- pthread_mutex_t _mutex[1];
- pthread_cond_t _cond[1];
-
- public: // TODO-FIXME: make dtor private
- ~PlatformParker() { guarantee(0, "invariant"); }
-
- public:
- PlatformParker() {
- int status;
- status = pthread_cond_init(_cond, NULL);
- assert_status(status == 0, status, "cond_init");
- status = pthread_mutex_init(_mutex, NULL);
- assert_status(status == 0, status, "mutex_init");
- }
- };
-
#endif // OS_BSD_VM_OS_BSD_HPP
--- 165,170 ----
< prev index next >