~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/multi_thread/multi_thread.cc

  • Committer: Monty Taylor
  • Date: 2009-04-10 21:13:45 UTC
  • mto: (992.1.1 mordred)
  • mto: This revision was merged to the branch mainline in revision 990.
  • Revision ID: mordred@inaugust.com-20090410211345-8ti3nt2i2otjrjly
New-style plugin registration now works.
New-style plugin re-registration on the way.

Show diffs side-by-side

added added

removed removed

Lines of Context:
109
109
    return scheduler;
110
110
  }
111
111
};
 
112
static MultiThreadFactory *factory= NULL;
112
113
 
113
 
static int init(void *p)
 
114
static int init(Plugin_registry &registry)
114
115
{
115
 
  SchedulerFactory** sched= static_cast<SchedulerFactory **>(p);
116
 
 
117
 
  *sched= new MultiThreadFactory();
118
 
 
 
116
  factory= new MultiThreadFactory();
 
117
  registry.registerPlugin(factory);
119
118
  return 0;
120
119
}
121
120
 
122
 
static int deinit(void *p)
 
121
static int deinit(void *)
123
122
{
124
 
 
125
 
  MultiThreadFactory *factory= static_cast<MultiThreadFactory *>(p);
126
 
  delete factory;
127
 
 
 
123
  if (factory)
 
124
    delete factory;
128
125
  return 0;
129
126
}
130
127