Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
4220afa5
Commit
4220afa5
authored
Dec 18, 2007
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
solaris fixes
include/lf.h: Forte fixes
parent
630169c6
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
18 additions
and
18 deletions
+18
-18
include/lf.h
include/lf.h
+4
-4
storage/maria/lockman.c
storage/maria/lockman.c
+4
-4
storage/maria/lockman.h
storage/maria/lockman.h
+2
-2
storage/maria/tablockman.c
storage/maria/tablockman.c
+3
-3
storage/maria/tablockman.h
storage/maria/tablockman.h
+2
-2
storage/maria/unittest/lockman-t.c
storage/maria/unittest/lockman-t.c
+1
-1
storage/maria/unittest/lockman1-t.c
storage/maria/unittest/lockman1-t.c
+1
-1
storage/maria/unittest/lockman2-t.c
storage/maria/unittest/lockman2-t.c
+1
-1
No files found.
include/lf.h
View file @
4220afa5
...
...
@@ -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
...
...
storage/maria/lockman.c
View file @
4220afa5
...
...
@@ -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
lock
man_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
lock
man_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
lock
man_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
lock
man_lock
_type
old_lock
;
DBUG_ASSERT
(
lo
->
loid
);
lf_rwlock_by_pins
(
pins
);
...
...
storage/maria/lockman.h
View file @
4220afa5
...
...
@@ -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
lock
man_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
lock
man_lock
_type
lock
);
int
lockman_release_locks
(
LOCKMAN
*
,
LOCK_OWNER
*
);
#ifdef EXTRA_DEBUG
...
...
storage/maria/tablockman.c
View file @
4220afa5
...
...
@@ -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
lock
man_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
lock
man_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
lock
man_lock
_type
new_lock
;
enum
lockman_getlock_result
res
;
int
i
;
...
...
storage/maria/tablockman.h
View file @
4220afa5
...
...
@@ -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
lock
man_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
lock
man_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
*
);
...
...
storage/maria/unittest/lockman-t.c
View file @
4220afa5
...
...
@@ -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
lock
man_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"
,
...
...
storage/maria/unittest/lockman1-t.c
View file @
4220afa5
...
...
@@ -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
lock
man_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"
,
...
...
storage/maria/unittest/lockman2-t.c
View file @
4220afa5
...
...
@@ -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
lock
man_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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment