Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Jaak Ristioja
OpenLDAP
Commits
f3f78e8a
Commit
f3f78e8a
authored
21 years ago
by
Howard Chu
Browse files
Options
Downloads
Patches
Plain Diff
ITS#2997 change MAXTHREADS to LDAP_MAXTHR
parent
6362951d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/libldap_r/tpool.c
+9
-9
9 additions, 9 deletions
libraries/libldap_r/tpool.c
with
9 additions
and
9 deletions
libraries/libldap_r/tpool.c
+
9
−
9
View file @
f3f78e8a
...
...
@@ -45,7 +45,7 @@ typedef struct ldap_int_thread_key_s {
* We don't expect to use many...
*/
#define MAXKEYS 32
#define MAXTHR
EADS
1024
/* must be a power of 2 */
#define
LDAP_
MAXTHR 1024
/* must be a power of 2 */
static
ldap_pvt_thread_t
tid_zero
;
...
...
@@ -57,7 +57,7 @@ static ldap_pvt_thread_t tid_zero;
static
struct
{
ldap_pvt_thread_t
id
;
ldap_int_thread_key_t
*
ctx
;
}
thread_keys
[
MAXTHR
EADS
];
}
thread_keys
[
LDAP_
MAXTHR
];
typedef
struct
ldap_int_thread_ctx_s
{
...
...
@@ -256,13 +256,13 @@ ldap_pvt_thread_pool_submit (
pool
->
ltp_starting
--
;
/* assign this thread ID to a key slot; start
* at the thread ID itself (mod MAXTHR
EADS
) and
* at the thread ID itself (mod
LDAP_
MAXTHR) and
* look for an empty slot.
*/
TID_HASH
(
thr
,
hash
);
for
(
rc
=
hash
&
(
MAXTHR
EADS
-
1
);
for
(
rc
=
hash
&
(
LDAP_
MAXTHR
-
1
);
!
TID_EQ
(
thread_keys
[
rc
].
id
,
tid_zero
);
rc
=
(
rc
+
1
)
&
(
MAXTHR
EADS
-
1
));
rc
=
(
rc
+
1
)
&
(
LDAP_
MAXTHR
-
1
));
thread_keys
[
rc
].
id
=
thr
;
}
else
{
/* couldn't create thread. back out of
...
...
@@ -420,8 +420,8 @@ ldap_int_thread_pool_wrapper (
/* store pointer to our keys */
TID_HASH
(
tid
,
hash
);
for
(
i
=
hash
&
(
MAXTHR
EADS
-
1
);
!
TID_EQ
(
thread_keys
[
i
].
id
,
tid
);
i
=
(
i
+
1
)
&
(
MAXTHR
EADS
-
1
));
for
(
i
=
hash
&
(
LDAP_
MAXTHR
-
1
);
!
TID_EQ
(
thread_keys
[
i
].
id
,
tid
);
i
=
(
i
+
1
)
&
(
LDAP_
MAXTHR
-
1
));
thread_keys
[
i
].
ctx
=
ltc_key
;
keyslot
=
i
;
...
...
@@ -557,8 +557,8 @@ void *ldap_pvt_thread_pool_context( )
tid
=
ldap_pvt_thread_self
();
TID_HASH
(
tid
,
hash
);
for
(
i
=
hash
&
(
MAXTHR
EADS
-
1
);
!
TID_EQ
(
thread_keys
[
i
].
id
,
tid_zero
)
&&
!
TID_EQ
(
thread_keys
[
i
].
id
,
tid
);
i
=
(
i
+
1
)
&
(
MAXTHR
EADS
-
1
));
for
(
i
=
hash
&
(
LDAP_
MAXTHR
-
1
);
!
TID_EQ
(
thread_keys
[
i
].
id
,
tid_zero
)
&&
!
TID_EQ
(
thread_keys
[
i
].
id
,
tid
);
i
=
(
i
+
1
)
&
(
LDAP_
MAXTHR
-
1
));
return
thread_keys
[
i
].
ctx
;
}
...
...
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