~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/heap/hp_panic.cc

Blackhole, CSV, Pool of Threads,Single Thread, Multi Thread.

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
#include "heap_priv.h"
17
17
 
18
18
using namespace std;
19
 
using namespace drizzled;
20
19
 
21
20
        /* if flag == HA_PANIC_CLOSE then all files are removed for more
22
21
           memory */
23
22
 
24
23
int hp_panic(enum ha_panic_function flag)
25
24
{
26
 
  THR_LOCK_heap.lock();
 
25
  pthread_mutex_lock(&THR_LOCK_heap);
27
26
  list<HP_INFO *>::iterator info_it= heap_open_list.begin();
28
27
  while (info_it != heap_open_list.end())
29
28
  {
53
52
    }
54
53
    ++share_it;
55
54
  }
56
 
  THR_LOCK_heap.unlock();
 
55
  pthread_mutex_unlock(&THR_LOCK_heap);
57
56
  return(0);
58
57
} /* hp_panic */