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
10cdf523
Commit
10cdf523
authored
Apr 15, 2020
by
Sergey Vojtovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
my_file_opened to my_atomic
parent
5876ed9e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
mysys/my_fopen.c
mysys/my_fopen.c
+2
-1
mysys/my_open.c
mysys/my_open.c
+2
-2
No files found.
mysys/my_fopen.c
View file @
10cdf523
...
...
@@ -222,7 +222,8 @@ FILE *my_fdopen(File Filedes, const char *name, int Flags, myf MyFlags)
{
if
(
my_file_info
[
Filedes
].
type
!=
UNOPEN
)
{
thread_safe_decrement32
(
&
my_file_opened
);
/* File is opened with my_open ! */
/* File is opened with my_open ! */
my_atomic_add32_explicit
(
&
my_file_opened
,
-
1
,
MY_MEMORY_ORDER_RELAXED
);
}
else
{
...
...
mysys/my_open.c
View file @
10cdf523
...
...
@@ -105,7 +105,7 @@ int my_close(File fd, myf MyFlags)
{
my_free
(
name
);
}
thread_safe_decrement32
(
&
my_file_opened
);
my_atomic_add32_explicit
(
&
my_file_opened
,
-
1
,
MY_MEMORY_ORDER_RELAXED
);
DBUG_RETURN
(
err
);
}
/* my_close */
...
...
@@ -133,7 +133,7 @@ File my_register_filename(File fd, const char *FileName, enum file_type
DBUG_ENTER
(
"my_register_filename"
);
if
((
int
)
fd
>=
MY_FILE_MIN
)
{
thread_safe_increment32
(
&
my_file_opened
);
my_atomic_add32_explicit
(
&
my_file_opened
,
1
,
MY_MEMORY_ORDER_RELAXED
);
if
((
uint
)
fd
>=
my_file_limit
)
DBUG_RETURN
(
fd
);
my_file_info
[
fd
].
name
=
(
char
*
)
my_strdup
(
FileName
,
MyFlags
);
...
...
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