ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/BDB/BDB.xs
(Generate patch)

Comparing BDB/BDB.xs (file contents):
Revision 1.73 by root, Tue Dec 8 17:09:06 2009 UTC vs.
Revision 1.75 by root, Fri Jul 29 08:35:35 2011 UTC

224static int next_pri = DEFAULT_PRI + PRI_BIAS; 224static int next_pri = DEFAULT_PRI + PRI_BIAS;
225 225
226static unsigned int started, idle, wanted; 226static unsigned int started, idle, wanted;
227 227
228/* worker threads management */ 228/* worker threads management */
229static mutex_t wrklock = X_MUTEX_INIT; 229static xmutex_t wrklock = X_MUTEX_INIT;
230 230
231typedef struct worker { 231typedef struct worker {
232 /* locked by wrklock */ 232 /* locked by wrklock */
233 struct worker *prev, *next; 233 struct worker *prev, *next;
234 234
235 thread_t tid; 235 xthread_t tid;
236 236
237 /* locked by reslock, reqlock or wrklock */ 237 /* locked by reslock, reqlock or wrklock */
238 bdb_req req; /* currently processed request */ 238 bdb_req req; /* currently processed request */
239 void *dbuf; 239 void *dbuf;
240 DIR *dirp; 240 DIR *dirp;
257static volatile unsigned int nreqs, nready, npending; 257static volatile unsigned int nreqs, nready, npending;
258static volatile unsigned int max_idle = 4; 258static volatile unsigned int max_idle = 4;
259static volatile unsigned int max_outstanding = 0xffffffff; 259static volatile unsigned int max_outstanding = 0xffffffff;
260static s_epipe respipe; 260static s_epipe respipe;
261 261
262static mutex_t reslock = X_MUTEX_INIT; 262static xmutex_t reslock = X_MUTEX_INIT;
263static mutex_t reqlock = X_MUTEX_INIT; 263static xmutex_t reqlock = X_MUTEX_INIT;
264static cond_t reqwait = X_COND_INIT; 264static xcond_t reqwait = X_COND_INIT;
265 265
266#if WORDACCESS_UNSAFE 266#if WORDACCESS_UNSAFE
267 267
268static unsigned int get_nready (void) 268static unsigned int get_nready (void)
269{ 269{
1407 bdb_txn_stash = gv_stashpv ("BDB::Txn" , 1); 1407 bdb_txn_stash = gv_stashpv ("BDB::Txn" , 1);
1408 bdb_cursor_stash = gv_stashpv ("BDB::Cursor" , 1); 1408 bdb_cursor_stash = gv_stashpv ("BDB::Cursor" , 1);
1409 bdb_db_stash = gv_stashpv ("BDB::Db" , 1); 1409 bdb_db_stash = gv_stashpv ("BDB::Db" , 1);
1410 bdb_sequence_stash = gv_stashpv ("BDB::Sequence", 1); 1410 bdb_sequence_stash = gv_stashpv ("BDB::Sequence", 1);
1411 1411
1412 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; ) 1412 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ > const_iv; civ--)
1413 newCONSTSUB (bdb_stash, (char *)civ->name, newSViv (civ->iv)); 1413 newCONSTSUB (bdb_stash, (char *)civ[-1].name, newSViv (civ[-1].iv));
1414 1414
1415 prepare_cb = &PL_sv_undef; 1415 prepare_cb = &PL_sv_undef;
1416 1416
1417 { 1417 {
1418 /* we currently only allow version, minor-version and patchlevel to go up to 255 */ 1418 /* we currently only allow version, minor-version and patchlevel to go up to 255 */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines