~ubuntu-branches/ubuntu/wily/flrig/wily

« back to all changes in this revision

Viewing changes to src/include/threads.h

  • Committer: Package Import Robot
  • Author(s): Kamal Mostafa
  • Date: 2014-10-25 11:17:10 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20141025111710-n32skgya3l9u1brw
Tags: 1.3.17-1
* New upstream release (Closes: #761839)
* Debian Standards-Version: 3.9.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
110
110
#  define CANCEL_THREAD(t__) pthread_cancel(t__);
111
111
#endif
112
112
 
113
 
#include "fl_lock.h"
 
113
/// This ensures that a mutex is always unlocked when leaving a function or block.
 
114
 
 
115
class guard_lock
 
116
{
 
117
public:
 
118
        guard_lock(pthread_mutex_t* m, int h = 0);
 
119
        ~guard_lock(void);
 
120
        const char *name(pthread_mutex_t *m);
 
121
private:
 
122
        pthread_mutex_t* mutex;
 
123
        int how;
 
124
};
114
125
 
115
126
#endif // !THREADS_H_