src/hotspot/os/linux/threadCritical_linux.cpp
changeset 47524 97569cf468f4
parent 47216 71c04702a3d5
equal deleted inserted replaced
47523:ceafc169d2a4 47524:97569cf468f4
    35 
    35 
    36 static pthread_t             tc_owner = 0;
    36 static pthread_t             tc_owner = 0;
    37 static pthread_mutex_t       tc_mutex = PTHREAD_MUTEX_INITIALIZER;
    37 static pthread_mutex_t       tc_mutex = PTHREAD_MUTEX_INITIALIZER;
    38 static int                   tc_count = 0;
    38 static int                   tc_count = 0;
    39 
    39 
    40 void ThreadCritical::initialize() {
       
    41 }
       
    42 
       
    43 void ThreadCritical::release() {
       
    44 }
       
    45 
       
    46 ThreadCritical::ThreadCritical() {
    40 ThreadCritical::ThreadCritical() {
    47   pthread_t self = pthread_self();
    41   pthread_t self = pthread_self();
    48   if (self != tc_owner) {
    42   if (self != tc_owner) {
    49     int ret = pthread_mutex_lock(&tc_mutex);
    43     int ret = pthread_mutex_lock(&tc_mutex);
    50     guarantee(ret == 0, "fatal error with pthread_mutex_lock()");
    44     guarantee(ret == 0, "fatal error with pthread_mutex_lock()");