diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2020-04-15 19:11:49 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2020-04-15 19:14:04 +0400 |
commit | 10cdf5230d0c8275830e9446c915651691219b39 (patch) | |
tree | cddabaa952fb4f425c71400c313dee8b085a8a1d /mysys/my_open.c | |
parent | 5876ed9e5b573596d449edfafc1f99caf5fd03d0 (diff) | |
download | mariadb-git-10cdf5230d0c8275830e9446c915651691219b39.tar.gz |
my_file_opened to my_atomic
Diffstat (limited to 'mysys/my_open.c')
-rw-r--r-- | mysys/my_open.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mysys/my_open.c b/mysys/my_open.c index 04324d13d71..84f70280987 100644 --- a/mysys/my_open.c +++ b/mysys/my_open.c @@ -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); |