Commit 4220afa5 authored by unknown's avatar unknown

solaris fixes


include/lf.h:
  Forte fixes
parent 630169c6
......@@ -168,15 +168,15 @@ void lf_pinbox_destroy(LF_PINBOX *pinbox);
lock_wrap(lf_pinbox_get_pins, LF_PINS *,
(LF_PINBOX *pinbox, void *stack_end),
(pinbox, stack_end),
&pinbox->pinarray.lock);
&pinbox->pinarray.lock)
lock_wrap_void(lf_pinbox_put_pins,
(LF_PINS *pins),
(pins),
&pins->pinbox->pinarray.lock);
&pins->pinbox->pinarray.lock)
lock_wrap_void(lf_pinbox_free,
(LF_PINS *pins, void *addr),
(pins, addr),
&pins->pinbox->pinarray.lock);
&pins->pinbox->pinarray.lock)
/*
memory allocator, lf_alloc-pin.c
......@@ -211,7 +211,7 @@ uint lf_alloc_pool_count(LF_ALLOCATOR *allocator);
lock_wrap(lf_alloc_new, void *,
(LF_PINS *pins),
(pins),
&pins->pinbox->pinarray.lock);
&pins->pinbox->pinarray.lock)
/*
extendible hash, lf_hash.c
......
......@@ -146,7 +146,7 @@ static int lock_compatibility_matrix[10][10]=
One should never get N from it, we assert the impossibility
*/
static enum lock_type lock_combining_matrix[10][10]=
static enum lockman_lock_type lock_combining_matrix[10][10]=
{/* N S X IS IX SIX LS LX SLX LSIX */
{ N, S, X, IS, IX, SIX, S, SLX, SLX, SIX}, /* N */
{ S, S, X, S, SIX, SIX, S, SLX, SLX, SIX}, /* S */
......@@ -249,7 +249,7 @@ static int lockfind(LOCK * volatile *head, LOCK *node,
uint64 resource, cur_resource;
intptr cur_link;
my_bool cur_active, compatible, upgrading, prev_active;
enum lock_type lock, prev_lock, cur_lock;
enum lockman_lock_type lock, prev_lock, cur_lock;
uint16 loid, cur_loid;
int cur_flags, flags;
......@@ -596,13 +596,13 @@ static inline uint calc_hash(uint64 resource)
*/
enum lockman_getlock_result lockman_getlock(LOCKMAN *lm, LOCK_OWNER *lo,
uint64 resource,
enum lock_type lock)
enum lockman_lock_type lock)
{
int res;
uint csize, bucket, hashnr;
LOCK *node, * volatile *el, *blocker;
LF_PINS *pins= lo->pins;
enum lock_type old_lock;
enum lockman_lock_type old_lock;
DBUG_ASSERT(lo->loid);
lf_rwlock_by_pins(pins);
......
......@@ -31,7 +31,7 @@
SLX - Shared + Loose eXclusive
LSIX - Loose Shared + Intention eXclusive
*/
enum lock_type { N, S, X, IS, IX, SIX, LS, LX, SLX, LSIX, LOCK_TYPE_LAST };
enum lockman_lock_type { N, S, X, IS, IX, SIX, LS, LX, SLX, LSIX, LOCK_TYPE_LAST };
struct lockman_lock;
......@@ -66,7 +66,7 @@ void lockman_init(LOCKMAN *, loid_to_lo_func *, uint);
void lockman_destroy(LOCKMAN *);
enum lockman_getlock_result lockman_getlock(LOCKMAN *lm, LOCK_OWNER *lo,
uint64 resource,
enum lock_type lock);
enum lockman_lock_type lock);
int lockman_release_locks(LOCKMAN *, LOCK_OWNER *);
#ifdef EXTRA_DEBUG
......
......@@ -162,7 +162,7 @@ static const int lock_compatibility_matrix[10][10]=
One should never get N from it, we assert the impossibility
*/
static const enum lock_type lock_combining_matrix[10][10]=
static const enum lockman_lock_type lock_combining_matrix[10][10]=
{/* N S X IS IX SIX LS LX SLX LSIX */
{ N, N, N, N, N, N, N, N, N, N}, /* N */
{ N, S, X, S, SIX, SIX, S, SLX, SLX, SIX}, /* S */
......@@ -269,13 +269,13 @@ void remove_from_wait_queue(TABLE_LOCK *lock, LOCKED_TABLE *table)
*/
enum lockman_getlock_result
tablockman_getlock(TABLOCKMAN *lm, TABLE_LOCK_OWNER *lo,
LOCKED_TABLE *table, enum lock_type lock)
LOCKED_TABLE *table, enum lockman_lock_type lock)
{
TABLE_LOCK *old, *new, *blocker, *blocker2;
TABLE_LOCK_OWNER *wait_for;
ulonglong deadline;
struct timespec timeout;
enum lock_type new_lock;
enum lockman_lock_type new_lock;
enum lockman_getlock_result res;
int i;
......
......@@ -33,7 +33,7 @@
*/
#ifndef _lockman_h
/* QQ: TODO remove N-locks */
enum lock_type { N, S, X, IS, IX, SIX, LS, LX, SLX, LSIX, LOCK_TYPE_LAST };
enum lockman_lock_type { N, S, X, IS, IX, SIX, LS, LX, SLX, LSIX, LOCK_TYPE_LAST };
enum lockman_getlock_result {
NO_MEMORY_FOR_LOCK=1, DEADLOCK, LOCK_TIMEOUT,
GOT_THE_LOCK,
......@@ -74,7 +74,7 @@ typedef struct {
void tablockman_init(TABLOCKMAN *, loid_to_tlo_func *, uint);
void tablockman_destroy(TABLOCKMAN *);
enum lockman_getlock_result tablockman_getlock(TABLOCKMAN *, TABLE_LOCK_OWNER *,
LOCKED_TABLE *, enum lock_type);
LOCKED_TABLE *, enum lockman_lock_type);
void tablockman_release_locks(TABLOCKMAN *, TABLE_LOCK_OWNER *);
void tablockman_init_locked_table(LOCKED_TABLE *, int);
void tablockman_destroy_locked_table(LOCKED_TABLE *);
......
......@@ -157,7 +157,7 @@ pthread_mutex_t rt_mutex;
int Nrows= 100;
int Ntables= 10;
int table_lock_ratio= 10;
enum lock_type lock_array[6]= {S, X, LS, LX, IS, IX};
enum lockman_lock_type lock_array[6]= {S, X, LS, LX, IS, IX};
char *lock2str[6]= {"S", "X", "LS", "LX", "IS", "IX"};
char *res2str[4]= {
"DIDN'T GET THE LOCK",
......
......@@ -166,7 +166,7 @@ pthread_mutex_t rt_mutex;
int Nrows= 100;
int Ntables= 10;
int table_lock_ratio= 10;
enum lock_type lock_array[6]= {S, X, LS, LX, IS, IX};
enum lockman_lock_type lock_array[6]= {S, X, LS, LX, IS, IX};
char *lock2str[6]= {"S", "X", "LS", "LX", "IS", "IX"};
char *res2str[]= {
"DIDN'T GET THE LOCK",
......
......@@ -193,7 +193,7 @@ pthread_mutex_t rt_mutex;
int Nrows= 100;
int Ntables= 10;
int table_lock_ratio= 10;
enum lock_type lock_array[6]= {S, X, LS, LX, IS, IX};
enum lockman_lock_type lock_array[6]= {S, X, LS, LX, IS, IX};
const char *lock2str[6]= {"S", "X", "LS", "LX", "IS", "IX"};
const char *res2str[]= {
0,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment