interrupt_pthread.h 540 Bytes
Newer Older
gejun's avatar
gejun committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
// bthread - A M:N threading library to make applications more concurrent.
// Copyright (c) 2012 Baidu.com, Inc. All Rights Reserved

// Author: Ge,Jun (gejun@baidu.com)
// Date: Tue Jul 10 17:40:58 CST 2012

#ifndef BAIDU_BTHREAD_INTERRUPT_PTHREAD_H
#define BAIDU_BTHREAD_INTERRUPT_PTHREAD_H

#include <pthread.h>

namespace bthread {

// Make blocking ops in the pthread returns -1 and EINTR.
// Returns what pthread_kill returns.
int interrupt_pthread(pthread_t th);

}  // namespace bthread

#endif // BAIDU_BTHREAD_INTERRUPT_PTHREAD_H