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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
5737acba
Commit
5737acba
authored
Apr 28, 2006
by
osku
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add 'level' parameter to rw_lock_create(), remove rw_lock_set_level().
parent
f970488a
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
18 additions
and
44 deletions
+18
-44
btr/btr0sea.c
btr/btr0sea.c
+1
-2
buf/buf0buf.c
buf/buf0buf.c
+2
-3
dict/dict0dict.c
dict/dict0dict.c
+3
-5
fil/fil0fil.c
fil/fil0fil.c
+1
-2
include/sync0rw.h
include/sync0rw.h
+4
-11
log/log0log.c
log/log0log.c
+2
-4
sync/sync0rw.c
sync/sync0rw.c
+4
-15
trx/trx0purge.c
trx/trx0purge.c
+1
-2
No files found.
btr/btr0sea.c
View file @
5737acba
...
@@ -136,13 +136,12 @@ btr_search_sys_create(
...
@@ -136,13 +136,12 @@ btr_search_sys_create(
btr_search_latch_temp
=
mem_alloc
(
sizeof
(
rw_lock_t
));
btr_search_latch_temp
=
mem_alloc
(
sizeof
(
rw_lock_t
));
rw_lock_create
(
&
btr_search_latch
);
rw_lock_create
(
&
btr_search_latch
,
SYNC_SEARCH_SYS
);
btr_search_sys
=
mem_alloc
(
sizeof
(
btr_search_sys_t
));
btr_search_sys
=
mem_alloc
(
sizeof
(
btr_search_sys_t
));
btr_search_sys
->
hash_index
=
ha_create
(
TRUE
,
hash_size
,
0
,
0
);
btr_search_sys
->
hash_index
=
ha_create
(
TRUE
,
hash_size
,
0
,
0
);
rw_lock_set_level
(
&
btr_search_latch
,
SYNC_SEARCH_SYS
);
}
}
/*********************************************************************
/*********************************************************************
...
...
buf/buf0buf.c
View file @
5737acba
...
@@ -524,12 +524,11 @@ buf_block_init(
...
@@ -524,12 +524,11 @@ buf_block_init(
block
->
n_pointers
=
0
;
block
->
n_pointers
=
0
;
rw_lock_create
(
&
(
block
->
lock
)
);
rw_lock_create
(
&
block
->
lock
,
SYNC_LEVEL_VARYING
);
ut_ad
(
rw_lock_validate
(
&
(
block
->
lock
)));
ut_ad
(
rw_lock_validate
(
&
(
block
->
lock
)));
#ifdef UNIV_SYNC_DEBUG
#ifdef UNIV_SYNC_DEBUG
rw_lock_create
(
&
(
block
->
debug_latch
));
rw_lock_create
(
&
block
->
debug_latch
,
SYNC_NO_ORDER_CHECK
);
rw_lock_set_level
(
&
(
block
->
debug_latch
),
SYNC_NO_ORDER_CHECK
);
#endif
/* UNIV_SYNC_DEBUG */
#endif
/* UNIV_SYNC_DEBUG */
}
}
...
...
dict/dict0dict.c
View file @
5737acba
...
@@ -731,11 +731,11 @@ dict_init(void)
...
@@ -731,11 +731,11 @@ dict_init(void)
UT_LIST_INIT
(
dict_sys
->
table_LRU
);
UT_LIST_INIT
(
dict_sys
->
table_LRU
);
rw_lock_create
(
&
dict_operation_lock
);
rw_lock_create
(
&
dict_operation_lock
,
SYNC_DICT_OPERATION
);
rw_lock_set_level
(
&
dict_operation_lock
,
SYNC_DICT_OPERATION
);
dict_foreign_err_file
=
os_file_create_tmpfile
();
dict_foreign_err_file
=
os_file_create_tmpfile
();
ut_a
(
dict_foreign_err_file
);
ut_a
(
dict_foreign_err_file
);
mutex_create
(
&
dict_foreign_err_mutex
,
SYNC_ANY_LATCH
);
mutex_create
(
&
dict_foreign_err_mutex
,
SYNC_ANY_LATCH
);
}
}
...
@@ -3607,9 +3607,7 @@ dict_tree_create(
...
@@ -3607,9 +3607,7 @@ dict_tree_create(
tree
->
magic_n
=
DICT_TREE_MAGIC_N
;
tree
->
magic_n
=
DICT_TREE_MAGIC_N
;
rw_lock_create
(
&
(
tree
->
lock
));
rw_lock_create
(
&
tree
->
lock
,
SYNC_INDEX_TREE
);
rw_lock_set_level
(
&
(
tree
->
lock
),
SYNC_INDEX_TREE
);
return
(
tree
);
return
(
tree
);
}
}
...
...
fil/fil0fil.c
View file @
5737acba
...
@@ -1050,8 +1050,7 @@ fil_space_create(
...
@@ -1050,8 +1050,7 @@ fil_space_create(
space
->
ibuf_data
=
NULL
;
space
->
ibuf_data
=
NULL
;
rw_lock_create
(
&
(
space
->
latch
));
rw_lock_create
(
&
space
->
latch
,
SYNC_FSP
);
rw_lock_set_level
(
&
(
space
->
latch
),
SYNC_FSP
);
HASH_INSERT
(
fil_space_t
,
hash
,
system
->
spaces
,
id
,
space
);
HASH_INSERT
(
fil_space_t
,
hash
,
system
->
spaces
,
id
,
space
);
...
...
include/sync0rw.h
View file @
5737acba
...
@@ -61,7 +61,7 @@ Creates, or rather, initializes an rw-lock object in a specified memory
...
@@ -61,7 +61,7 @@ Creates, or rather, initializes an rw-lock object in a specified memory
location (which must be appropriately aligned). The rw-lock is initialized
location (which must be appropriately aligned). The rw-lock is initialized
to the non-locked state. Explicit freeing of the rw-lock with rw_lock_free
to the non-locked state. Explicit freeing of the rw-lock with rw_lock_free
is necessary only if the memory block containing it is freed. */
is necessary only if the memory block containing it is freed. */
#define rw_lock_create(L
) rw_lock_create_func((L
), __FILE__, __LINE__, #L)
#define rw_lock_create(L
, level) rw_lock_create_func((L), (level
), __FILE__, __LINE__, #L)
/*=====================*/
/*=====================*/
/**********************************************************************
/**********************************************************************
...
@@ -74,6 +74,7 @@ void
...
@@ -74,6 +74,7 @@ void
rw_lock_create_func
(
rw_lock_create_func
(
/*================*/
/*================*/
rw_lock_t
*
lock
,
/* in: pointer to memory */
rw_lock_t
*
lock
,
/* in: pointer to memory */
ulint
level
,
/* in: level */
const
char
*
cfile_name
,
/* in: file name where created */
const
char
*
cfile_name
,
/* in: file name where created */
ulint
cline
,
/* in: file line where created */
ulint
cline
,
/* in: file line where created */
const
char
*
cmutex_name
);
/* in: mutex name */
const
char
*
cmutex_name
);
/* in: mutex name */
...
@@ -299,14 +300,6 @@ rw_lock_x_unlock_direct(
...
@@ -299,14 +300,6 @@ rw_lock_x_unlock_direct(
/*====================*/
/*====================*/
rw_lock_t
*
lock
);
/* in: rw-lock */
rw_lock_t
*
lock
);
/* in: rw-lock */
/**********************************************************************
/**********************************************************************
Sets the rw-lock latching level field. */
void
rw_lock_set_level
(
/*==============*/
rw_lock_t
*
lock
,
/* in: rw-lock */
ulint
level
);
/* in: level */
/**********************************************************************
Returns the value of writer_count for the lock. Does not reserve the lock
Returns the value of writer_count for the lock. Does not reserve the lock
mutex, so the caller must be sure it is not changed during the call. */
mutex, so the caller must be sure it is not changed during the call. */
UNIV_INLINE
UNIV_INLINE
...
...
log/log0log.c
View file @
5737acba
...
@@ -797,8 +797,7 @@ log_init(void)
...
@@ -797,8 +797,7 @@ log_init(void)
log_sys
->
last_checkpoint_lsn
=
log_sys
->
lsn
;
log_sys
->
last_checkpoint_lsn
=
log_sys
->
lsn
;
log_sys
->
n_pending_checkpoint_writes
=
0
;
log_sys
->
n_pending_checkpoint_writes
=
0
;
rw_lock_create
(
&
(
log_sys
->
checkpoint_lock
));
rw_lock_create
(
&
log_sys
->
checkpoint_lock
,
SYNC_NO_ORDER_CHECK
);
rw_lock_set_level
(
&
(
log_sys
->
checkpoint_lock
),
SYNC_NO_ORDER_CHECK
);
log_sys
->
checkpoint_buf
=
ut_align
(
log_sys
->
checkpoint_buf
=
ut_align
(
mem_alloc
(
2
*
OS_FILE_LOG_BLOCK_SIZE
),
mem_alloc
(
2
*
OS_FILE_LOG_BLOCK_SIZE
),
...
@@ -814,8 +813,7 @@ log_init(void)
...
@@ -814,8 +813,7 @@ log_init(void)
log_sys
->
n_pending_archive_ios
=
0
;
log_sys
->
n_pending_archive_ios
=
0
;
rw_lock_create
(
&
(
log_sys
->
archive_lock
));
rw_lock_create
(
&
log_sys
->
archive_lock
,
SYNC_NO_ORDER_CHECK
);
rw_lock_set_level
(
&
(
log_sys
->
archive_lock
),
SYNC_NO_ORDER_CHECK
);
log_sys
->
archive_buf
=
NULL
;
log_sys
->
archive_buf
=
NULL
;
...
...
sync/sync0rw.c
View file @
5737acba
...
@@ -89,6 +89,7 @@ void
...
@@ -89,6 +89,7 @@ void
rw_lock_create_func
(
rw_lock_create_func
(
/*================*/
/*================*/
rw_lock_t
*
lock
,
/* in: pointer to memory */
rw_lock_t
*
lock
,
/* in: pointer to memory */
ulint
level
,
/* in: level */
const
char
*
cfile_name
,
/* in: file name where created */
const
char
*
cfile_name
,
/* in: file name where created */
ulint
cline
,
/* in: file line where created */
ulint
cline
,
/* in: file line where created */
const
char
*
cmutex_name
)
/* in: mutex name */
const
char
*
cmutex_name
)
/* in: mutex name */
...
@@ -115,10 +116,10 @@ rw_lock_create_func(
...
@@ -115,10 +116,10 @@ rw_lock_create_func(
#ifdef UNIV_SYNC_DEBUG
#ifdef UNIV_SYNC_DEBUG
UT_LIST_INIT
(
lock
->
debug_list
);
UT_LIST_INIT
(
lock
->
debug_list
);
lock
->
level
=
SYNC_LEVEL_VARYING
;
#endif
/* UNIV_SYNC_DEBUG */
#endif
/* UNIV_SYNC_DEBUG */
lock
->
level
=
level
;
lock
->
magic_n
=
RW_LOCK_MAGIC_N
;
lock
->
magic_n
=
RW_LOCK_MAGIC_N
;
lock
->
cfile_name
=
cfile_name
;
lock
->
cfile_name
=
cfile_name
;
...
@@ -669,18 +670,6 @@ rw_lock_remove_debug_info(
...
@@ -669,18 +670,6 @@ rw_lock_remove_debug_info(
}
}
#endif
/* UNIV_SYNC_DEBUG */
#endif
/* UNIV_SYNC_DEBUG */
/**********************************************************************
Sets the rw-lock latching level field. */
void
rw_lock_set_level
(
/*==============*/
rw_lock_t
*
lock
,
/* in: rw-lock */
ulint
level
)
/* in: level */
{
lock
->
level
=
level
;
}
#ifdef UNIV_SYNC_DEBUG
#ifdef UNIV_SYNC_DEBUG
/**********************************************************************
/**********************************************************************
Checks if the thread has locked the rw-lock in the specified mode, with
Checks if the thread has locked the rw-lock in the specified mode, with
...
...
trx/trx0purge.c
View file @
5737acba
...
@@ -211,8 +211,7 @@ trx_purge_sys_create(void)
...
@@ -211,8 +211,7 @@ trx_purge_sys_create(void)
purge_sys
->
purge_undo_no
=
ut_dulint_zero
;
purge_sys
->
purge_undo_no
=
ut_dulint_zero
;
purge_sys
->
next_stored
=
FALSE
;
purge_sys
->
next_stored
=
FALSE
;
rw_lock_create
(
&
(
purge_sys
->
latch
));
rw_lock_create
(
&
purge_sys
->
latch
,
SYNC_PURGE_LATCH
);
rw_lock_set_level
(
&
(
purge_sys
->
latch
),
SYNC_PURGE_LATCH
);
mutex_create
(
&
purge_sys
->
mutex
,
SYNC_PURGE_SYS
);
mutex_create
(
&
purge_sys
->
mutex
,
SYNC_PURGE_SYS
);
...
...
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