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
ce8e0aa0
Commit
ce8e0aa0
authored
Jun 02, 2003
by
heikki@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
os0sync.c:
Do not try to reserve os_sync_mutex in shutdown after it has been freed
parent
5eaa3c4e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
4 deletions
+21
-4
innobase/os/os0sync.c
innobase/os/os0sync.c
+21
-4
No files found.
innobase/os/os0sync.c
View file @
ce8e0aa0
...
@@ -88,6 +88,12 @@ os_sync_free(void)
...
@@ -88,6 +88,12 @@ os_sync_free(void)
mutex
=
UT_LIST_GET_FIRST
(
os_mutex_list
);
mutex
=
UT_LIST_GET_FIRST
(
os_mutex_list
);
while
(
mutex
)
{
while
(
mutex
)
{
if
(
mutex
==
os_sync_mutex
)
{
/* Set the flag to FALSE so that we do not try to
reserve os_sync_mutex any more in remaining freeing
operations in shutdown */
os_sync_mutex_inited
=
FALSE
;
}
os_mutex_free
(
mutex
);
os_mutex_free
(
mutex
);
...
@@ -517,13 +523,17 @@ os_mutex_free(
...
@@ -517,13 +523,17 @@ os_mutex_free(
{
{
ut_a
(
mutex
);
ut_a
(
mutex
);
if
(
os_sync_mutex_inited
)
{
os_mutex_enter
(
os_sync_mutex
);
os_mutex_enter
(
os_sync_mutex
);
}
UT_LIST_REMOVE
(
os_mutex_list
,
os_mutex_list
,
mutex
);
UT_LIST_REMOVE
(
os_mutex_list
,
os_mutex_list
,
mutex
);
os_mutex_count
--
;
os_mutex_count
--
;
if
(
os_sync_mutex_inited
)
{
os_mutex_exit
(
os_sync_mutex
);
os_mutex_exit
(
os_sync_mutex
);
}
#ifdef __WIN__
#ifdef __WIN__
ut_a
(
CloseHandle
(
mutex
->
handle
));
ut_a
(
CloseHandle
(
mutex
->
handle
));
...
@@ -614,9 +624,16 @@ os_fast_mutex_free(
...
@@ -614,9 +624,16 @@ os_fast_mutex_free(
#else
#else
ut_a
(
0
==
pthread_mutex_destroy
(
fast_mutex
));
ut_a
(
0
==
pthread_mutex_destroy
(
fast_mutex
));
#endif
#endif
if
(
os_sync_mutex_inited
)
{
/* When freeing the last mutexes, we have
already freed os_sync_mutex */
os_mutex_enter
(
os_sync_mutex
);
os_mutex_enter
(
os_sync_mutex
);
}
os_fast_mutex_count
--
;
os_fast_mutex_count
--
;
if
(
os_sync_mutex_inited
)
{
os_mutex_exit
(
os_sync_mutex
);
os_mutex_exit
(
os_sync_mutex
);
}
}
}
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