Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pike
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
Container Registry
Model registry
Operate
Environments
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
pikelang
pike
Commits
6e1db5b2
Commit
6e1db5b2
authored
26 years ago
by
Henrik (Grubba) Grubbström
Browse files
Options
Downloads
Patches
Plain Diff
Added some black magic to init_threads_disable().
Rev: src/threads.c:1.74
parent
283361af
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/threads.c
+17
-2
17 additions, 2 deletions
src/threads.c
with
17 additions
and
2 deletions
src/threads.c
+
17
−
2
View file @
6e1db5b2
#include
"global.h"
#include
"global.h"
RCSID
(
"$Id: threads.c,v 1.7
3
1998/07/0
5 13:5
1:50 grubba Exp $"
);
RCSID
(
"$Id: threads.c,v 1.7
4
1998/07/0
9 2
1:50
:37
grubba Exp $"
);
int
num_threads
=
1
;
int
num_threads
=
1
;
int
threads_disabled
=
0
;
int
threads_disabled
=
0
;
...
@@ -174,7 +174,22 @@ void exit_threads_disable(struct object *o)
...
@@ -174,7 +174,22 @@ void exit_threads_disable(struct object *o)
void
init_threads_disable
(
struct
object
*
o
)
void
init_threads_disable
(
struct
object
*
o
)
{
{
threads_disabled
++
;
/* Serious black magic to avoid dead-locks */
if
(
!
threads_disabled
)
{
extern
MUTEX_T
password_protection_mutex
;
THREADS_ALLOW_UID
();
mt_lock
(
&
password_protection_mutex
);
THREADS_DISALLOW_UID
();
threads_disabled
=
1
;
mt_unlock
(
&
password_protection_mutex
);
}
else
{
threads_disabled
++
;
}
THREADS_FPRINTF
((
stderr
,
"init_threads_disable(): threads_disabled:%d
\n
"
,
THREADS_FPRINTF
((
stderr
,
"init_threads_disable(): threads_disabled:%d
\n
"
,
threads_disabled
));
threads_disabled
));
while
(
live_threads
)
{
while
(
live_threads
)
{
...
...
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