~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/user_locks/barriers.cc

  • Committer: Mark Atwood
  • Date: 2011-08-11 03:05:03 UTC
  • mfrom: (2385.1.12 refactor4)
  • Revision ID: me@mark.atwood.name-20110811030503-rp9xjihc5x3y0x4q
mergeĀ lp:~olafvdspek/drizzle/refactor4

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
 */
20
20
 
21
 
#include "config.h"
22
 
#include "plugin/user_locks/module.h"
 
21
#include <config.h>
 
22
#include <plugin/user_locks/module.h>
23
23
 
24
24
#include <boost/thread/locks.hpp>
25
25
 
57
57
  if ( iter == barrier_map.end())
58
58
    return NOT_FOUND;
59
59
 
60
 
  if (not (*iter).second->getOwner() == owner)
 
60
  if (not iter->second->getOwner() == owner)
61
61
    return NOT_OWNED_BY;
62
62
 
63
 
  (*iter).second->signal(); // We tell anyone left to start running
 
63
  iter->second->signal(); // We tell anyone left to start running
64
64
  (void)barrier_map.erase(arg);
65
65
 
66
66
  return SUCCESS;
72
72
  Map::iterator iter= barrier_map.find(arg);
73
73
 
74
74
  if (iter != barrier_map.end())
75
 
    return (*iter).second;
 
75
    return iter->second;
76
76
 
77
77
  return Barrier::shared_ptr();
78
78
}