Releases a lock on a resource but instead of leaving the lock free (a value of 0), it sets the lock to invalid (a value of 0xffffffff). This signals to any thread waiting on the lock, that it must abandon the intended operation on the resource protected by the lock. Kill is called where the resourse is about to be deleted. Arguments: None Returns: None Note this operation terminates execution if the current thread is trying to unlock a resource that is locked by another thread or not locked at all

Return TypeFunction nameArguments
voidhzLockS::Kill(void)

Declared in file: hzLock.h
Defined in file : hzLock.cpp

Function Logic:

0:START 1:unknown 2:tid 3:unknown 4:items 5:unknown 6:items 7:unknown 8:items 9:m_lockval 10: No text

Function body:

void hzLockS::Kill (void)
{
   //  Releases a lock on a resource but instead of leaving the lock free (a value of 0), it sets the lock to invalid (a value of 0xffffffff). This signals to
   //  any thread waiting on the lock, that it must abandon the intended operation on the resource protected by the lock. Kill is called where the resourse is
   //  about to be deleted.
   //  
   //  Arguments: None
   //  Returns: None
   //  
   //  Note this operation terminates execution if the current thread is trying to unlock a resource that is locked by another thread or not locked at all
   uint32_t    tid ;       //  Caller thread id
   if (_hzGlobal_MT)
   {
       tid = pthread_self() ;
       if (!m_lockval)
           Fatal("hzLockS::hzKill. Attempt by thread %u to kill unaquired lock\n", tid) ;
       if (m_lockval == 0xffffffff)
           Fatal("hzLockS::hzKill. Attempt by thread %u to kill a deprecated lock\n", tid) ;
       if (m_lockval != tid)
           Fatal("hzLockS::hzKill. Attempt by thread %u to kill lock aquired by thread (%u)\n", tid, m_lockval) ;
       m_lockval = 0xffffffff;
   }
}