Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tarantool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
tarantool
Commits
83f7f8ca
Commit
83f7f8ca
authored
12 years ago
by
Konstantin Osipov
Browse files
Options
Downloads
Patches
Plain Diff
Review fixes.
parent
01526fb2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/assoc.h
+0
-5
0 additions, 5 deletions
include/assoc.h
include/mhash.h
+6
-10
6 additions, 10 deletions
include/mhash.h
with
6 additions
and
15 deletions
include/assoc.h
+
0
−
5
View file @
83f7f8ca
#ifndef TARANTOOL_ASSOC_H_INCLUDED
#define TARANTOOL_ASSOC_H_INCLUDED
/*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
...
...
@@ -106,5 +103,3 @@ mh_strptr_hash(const mh_node_t *a, mh_hash_arg_t arg) {
#define mh_eq_arg_t void *
#define mh_eq(a, b, arg) (lstrcmp(a->key, b->key) == 0)
#include
<mhash.h>
#endif
/* TARANTOOL_ASSOC_H_INCLUDED */
This diff is collapsed.
Click to expand it.
include/mhash.h
+
6
−
10
View file @
83f7f8ca
...
...
@@ -64,12 +64,8 @@
#define mh_ecat(a, b) mh_cat(a, b)
#define _mh(x) mh_ecat(mh_name, x)
#ifndef likely
#define likely(x) __builtin_expect((x),1)
#endif
#ifndef unlikely
#define unlikely(x) __builtin_expect((x),0)
#ifndef mh_unlikely
#define mh_unlikely(x) __builtin_expect((x),0)
#endif
#ifndef MH_TYPEDEFS
...
...
@@ -254,16 +250,16 @@ _mh(put)(struct _mh(t) *h, const mh_node_t *node,
goto
put_done
;
#if MH_INCREMENTAL_RESIZE
if
(
unlikely
(
h
->
resize_position
>
0
))
if
(
mh_
unlikely
(
h
->
resize_position
>
0
))
_mh
(
resize
)(
h
,
hash_arg
,
eq_arg
);
else
if
(
unlikely
(
h
->
n_dirty
>=
h
->
upper_bound
))
{
else
if
(
mh_
unlikely
(
h
->
n_dirty
>=
h
->
upper_bound
))
{
if
(
_mh
(
start_resize
)(
h
,
h
->
n_buckets
+
1
,
0
,
hash_arg
,
eq_arg
))
goto
put_done
;
}
if
(
h
->
resize_position
)
_mh
(
put
)(
h
->
shadow
,
node
,
hash_arg
,
eq_arg
,
NULL
);
#else
if
(
unlikely
(
h
->
n_dirty
>=
h
->
upper_bound
))
{
if
(
mh_
unlikely
(
h
->
n_dirty
>=
h
->
upper_bound
))
{
if
(
_mh
(
start_resize
)(
h
,
h
->
n_buckets
+
1
,
h
->
size
,
hash_arg
,
eq_arg
))
goto
put_done
;
...
...
@@ -303,7 +299,7 @@ _mh(del)(struct _mh(t) *h, mh_int_t x,
if
(
!
mh_dirty
(
h
,
x
))
h
->
n_dirty
--
;
#if MH_INCREMENTAL_RESIZE
if
(
unlikely
(
h
->
resize_position
))
if
(
mh_
unlikely
(
h
->
resize_position
))
_mh
(
del_resize
)(
h
,
x
,
hash_arg
,
eq_arg
);
#endif
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment