~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/heap/hp_open.cc

  • Committer: Brian Aker
  • Date: 2010-08-08 04:21:29 UTC
  • mto: This revision was merged to the branch mainline in revision 1697.
  • Revision ID: brian@gaz-20100808042129-x4we3721ql8lfsje
Update for HEAP to convert its lock to boost.

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
{
59
59
  HP_INFO *info;
60
60
 
61
 
  pthread_mutex_lock(&THR_LOCK_heap);
 
61
  THR_LOCK_heap.lock();
62
62
  if ((info= heap_open_from_share(share, mode)))
63
63
  {
64
64
    heap_open_list.push_front(info);
65
65
  }
66
 
  pthread_mutex_unlock(&THR_LOCK_heap);
 
66
  THR_LOCK_heap.unlock();
67
67
  return(info);
68
68
}
69
69
 
81
81
  HP_INFO *info;
82
82
  HP_SHARE *share;
83
83
 
84
 
  pthread_mutex_lock(&THR_LOCK_heap);
 
84
  THR_LOCK_heap.lock();
85
85
  if (!(share= hp_find_named_heap(name)))
86
86
  {
87
87
    errno= ENOENT;
88
 
    pthread_mutex_unlock(&THR_LOCK_heap);
 
88
    THR_LOCK_heap.unlock();
89
89
    return(0);
90
90
  }
91
91
  if ((info= heap_open_from_share(share, mode)))
92
92
  {
93
93
    heap_open_list.push_front(info);
94
94
  }
95
 
  pthread_mutex_unlock(&THR_LOCK_heap);
 
95
  THR_LOCK_heap.unlock();
96
96
  return(info);
97
97
}
98
98