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
8e406f9a
Commit
8e406f9a
authored
May 06, 2010
by
Paul McCullagh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added new lock definitions
parent
3855bca0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
0 deletions
+55
-0
storage/pbxt/src/filesys_xt.cc
storage/pbxt/src/filesys_xt.cc
+2
-0
storage/pbxt/src/lock_xt.h
storage/pbxt/src/lock_xt.h
+53
-0
No files found.
storage/pbxt/src/filesys_xt.cc
View file @
8e406f9a
...
...
@@ -60,6 +60,8 @@
#define DEBUG_FAST_MAC
#endif
#define DEBUG_FAST_MAC
#ifdef DEBUG_TRACE_FILES
//#define PRINTF xt_ftracef
#define PRINTF xt_trace
...
...
storage/pbxt/src/lock_xt.h
View file @
8e406f9a
...
...
@@ -716,4 +716,57 @@ void xt_exit_row_lock_list(XTRowLockListPtr rl);
#define XT_HAVE_LOCK 2
#define XT_WAITING 3
/*
* -----------------------------------------------------------------------
* RECURSIVE MUTEX (allows lockers to lock again)
*/
typedef
struct
XTRecursiveMutex
{
struct
XTThread
*
rm_locker
;
u_int
rm_lock_count
;
xt_mutex_type
rm_mutex
;
#ifdef XT_THREAD_LOCK_INFO
XTThreadLockInfoRec
rm_lock_info
;
const
char
*
rm_name
;
#endif
}
XTRecursiveMutexRec
,
*
XTRecursiveMutexPtr
;
#ifdef XT_THREAD_LOCK_INFO
#define xt_recursivemutex_init_with_autoname(a,b) xt_recursivemutex_init(a,b,LOCKLIST_ARG_SUFFIX(b))
void
xt_recursivemutex_init
(
struct
XTThread
*
self
,
XTRecursiveMutexPtr
rm
,
const
char
*
name
);
#else
#define xt_recursivemutex_init_with_autoname(a,b) xt_recursivemutex_init(a,b)
void
xt_recursivemutex_init
(
struct
XTThread
*
self
,
XTRecursiveMutexPtr
rm
);
#endif
void
xt_recursivemutex_free
(
XTRecursiveMutexPtr
rm
);
void
xt_recursivemutex_lock
(
struct
XTThread
*
self
,
XTRecursiveMutexPtr
rm
);
void
xt_recursivemutex_unlock
(
struct
XTThread
*
self
,
XTRecursiveMutexPtr
rm
);
typedef
struct
XTRecurRWLock
{
struct
XTThread
*
rrw_locker
;
u_int
rrw_lock_count
;
xt_rwlock_type
rrw_lock
;
#ifdef XT_THREAD_LOCK_INFO
XTThreadLockInfoRec
rrw_lock_info
;
const
char
*
rrw_name
;
#endif
}
XTRecurRWLockRec
,
*
XTRecurRWLockPtr
;
#ifdef XT_THREAD_LOCK_INFO
#define xt_recurrwlock_init_with_autoname(a,b) xt_recurrwlock_init(a,b,LOCKLIST_ARG_SUFFIX(b))
void
xt_recurrwlock_init
(
struct
XTThread
*
self
,
XTRecurRWLockPtr
rrw
,
const
char
*
name
);
#else
#define xt_recurrwlock_init_with_autoname(a,b) xt_recurrwlock_init(a,b)
void
xt_recurrwlock_init
(
struct
XTThread
*
self
,
XTRecurRWLockPtr
rrw
);
#endif
void
xt_recurrwlock_free
(
XTRecurRWLockPtr
rrw
);
void
xt_recurrwlock_xlock
(
struct
XTThread
*
self
,
XTRecurRWLockPtr
rrw
);
void
xt_recurrwlock_slock
(
struct
XTThread
*
self
,
XTRecurRWLockPtr
rrw
);
void
xt_recurrwlock_slock_ns
(
XTRecurRWLockPtr
rrw
);
void
xt_recurrwlock_unxlock
(
struct
XTThread
*
self
,
XTRecurRWLockPtr
rrw
);
void
xt_recurrwlock_unslock
(
struct
XTThread
*
self
,
XTRecurRWLockPtr
rrw
);
void
xt_recurrwlock_unslock_ns
(
XTRecurRWLockPtr
rrw
);
#endif
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