/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version: 1.3.21
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */


Class name: SynchPthread extends: Synch fields: swigCPtrForSynchPthread {

  Method [ pvtSetCPtr: newCPtr memoryOwn: newCMemoryOwn
    super pvtSetCPtr: (CslNI cslNI_SWIGSynchPthreadToSynch: newCPtr) memoryOwn: newCMemoryOwn.
    swigCPtrForSynchPthread := newCPtr.
  ]

  Method [ getCPtrForSynchPthread
    ^swigCPtrForSynchPthread
  ]


  Method[ swigFinalize
    super swigFinalize.
    self delete.
  ]

  Method [ delete 
    (swigCMemoryOwn and:[ swigCPtrForSynchPthread ~~ 0 ]) ifTrue:[
      swigCMemoryOwn := false.
      CslNI cslNI_delete_SynchPthread: swigCPtrForSynchPthread.
    ].
    swigCPtrForSynchPthread := 0.
    super delete.
  ]

  Function[ getCPtr: obj
     obj isNil ifTrue:[^0].
     ^obj getCPtrForSynchPthread
  ]

  Function [ new
    ^self fromPointer: (CslNI cslNI_new_SynchPthread) memoryOwn: true
  ]

  Method [ setMMutex: mMutex 
    CslNI cslNI_set_SynchPthread_mMutex: swigCPtrForSynchPthread with: (SwigTypePpthreadmutext getCPtr: mMutex)
  ]

  Method [ getMMutex 
    ^SwigTypePpthreadmutext fromPointer: CslNI cslNI_get_SynchPthread_mMutex: swigCPtrForSynchPthread  memoryOwn: true
  ]

  Method [ setMCond: mCond 
    CslNI cslNI_set_SynchPthread_mCond: swigCPtrForSynchPthread with: (SwigTypePpthreadcondt getCPtr: mCond)
  ]

  Method [ getMCond 
    ^SwigTypePpthreadcondt fromPointer: CslNI cslNI_get_SynchPthread_mCond: swigCPtrForSynchPthread  memoryOwn: true
  ]

  Method [ lock 
    ^CslNI cslNI_SynchPthread_lock: swigCPtrForSynchPthread 
  ]

  Method [ unlock 
    ^CslNI cslNI_SynchPthread_unlock: swigCPtrForSynchPthread 
  ]

  Method [ condWait 
    ^CslNI cslNI_SynchPthread_condWait: swigCPtrForSynchPthread 
  ]

  Method [ condSignal 
    ^CslNI cslNI_SynchPthread_condSignal: swigCPtrForSynchPthread 
  ]

}
