X-Git-Url: http://xvm.mit.edu/gitweb/invirt/third/libt4.git/blobdiff_plain/5a5c578e2e358a121cdb9234a6cb11c4ecfbf323..3abd3952c1f4441f0dd6eae9883b2d01ed9cd56b:/lock_client.cc diff --git a/lock_client.cc b/lock_client.cc index 99dcb5b..0b071f5 100644 --- a/lock_client.cc +++ b/lock_client.cc @@ -4,7 +4,7 @@ #include void lock_state::wait(lock & mutex_lock) { - auto self = std::this_thread::get_id(); + auto self = this_thread::get_id(); c[self].wait(mutex_lock); c.erase(self); } @@ -22,14 +22,14 @@ void lock_state::signal(thread::id who) { typedef map lock_map; -unsigned int lock_client::last_port = 0; +in_port_t lock_client::last_port = 0; lock_state & lock_client::get_lock_state(lock_protocol::lockid_t lid) { lock sl(lock_table_lock); return lock_table[lid]; // creates the lock if it doesn't already exist } -lock_client::lock_client(string xdst, class lock_release_user *_lu) : lu(_lu), next_xid(0) { +lock_client::lock_client(string xdst, lock_release_user *_lu) : lu(_lu), next_xid(0) { cl = new rpcc(xdst); if (cl->bind() < 0) LOG("lock_client: call bind"); @@ -80,7 +80,7 @@ int lock_client::stat(lock_protocol::lockid_t lid) { lock_protocol::status lock_client::acquire(lock_protocol::lockid_t lid) { lock_state &st = get_lock_state(lid); lock sl(st.m); - auto self = std::this_thread::get_id(); + auto self = this_thread::get_id(); // check for reentrancy VERIFY(st.state != lock_state::locked || st.held_by != self); @@ -145,7 +145,7 @@ lock_protocol::status lock_client::acquire(lock_protocol::lockid_t lid) { lock_protocol::status lock_client::release(lock_protocol::lockid_t lid) { lock_state &st = get_lock_state(lid); lock sl(st.m); - auto self = std::this_thread::get_id(); + auto self = this_thread::get_id(); VERIFY(st.state == lock_state::locked && st.held_by == self); st.state = lock_state::free; LOG("Lock " << lid << ": free");