~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/internal/thread_var.h

  • Committer: Monty Taylor
  • Date: 2010-09-28 07:45:44 UTC
  • mto: (1799.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1800.
  • Revision ID: mordred@inaugust.com-20100928074544-s3ujnv6s8wro74l2
Added BSD copying file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
   You should have received a copy of the GNU General Public License
13
13
   along with this program; if not, write to the Free Software
14
 
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
 
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
15
 
16
16
/* Defines to make different thread packages compatible */
17
17
 
21
21
#include <pthread.h>
22
22
#include <boost/thread/recursive_mutex.hpp>
23
23
#include <boost/thread/mutex.hpp>
24
 
#include <boost/thread/shared_mutex.hpp>
25
24
#include <boost/thread/condition_variable.hpp>
26
25
 
27
26
namespace drizzled
29
28
namespace internal
30
29
{
31
30
 
 
31
static pthread_t wrapper_pthread_self()
 
32
{
 
33
  return pthread_self();
 
34
}
 
35
 
32
36
struct st_my_thread_var
33
37
{
34
 
  boost::condition_variable_any suspend;
 
38
  boost::condition_variable suspend;
35
39
  boost::mutex mutex;
36
40
  boost::mutex * volatile current_mutex;
37
 
  boost::condition_variable_any * volatile current_cond;
 
41
  boost::condition_variable * volatile current_cond;
 
42
  pthread_t pthread_self;
38
43
  uint64_t id;
39
44
  int volatile abort;
 
45
  struct st_my_thread_var *next,**prev;
40
46
  void *opt_info;
41
47
 
42
48
  st_my_thread_var() :
44
50
    current_cond(0),
45
51
    id(0),
46
52
    abort(false),
 
53
    next(0),
 
54
    prev(0),
47
55
    opt_info(0)
48
56
  { 
 
57
    pthread_self= wrapper_pthread_self();
49
58
  }
50
59
 
51
60
  ~st_my_thread_var()