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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pikelang
pike
Commits
38ac577c
Commit
38ac577c
authored
May 19, 1998
by
Fredrik Hübinette (Hubbe)
Browse files
Options
Downloads
Patches
Plain Diff
flock fix + more debug
Rev: src/modules/files/file.c:1.97 Rev: src/modules/files/file_functions.h:1.2
parent
c337d9fd
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/modules/files/file.c
+21
-3
21 additions, 3 deletions
src/modules/files/file.c
src/modules/files/file_functions.h
+5
-0
5 additions, 0 deletions
src/modules/files/file_functions.h
with
26 additions
and
3 deletions
src/modules/files/file.c
+
21
−
3
View file @
38ac577c
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
\*/
\*/
#include
"global.h"
#include
"global.h"
RCSID
(
"$Id: file.c,v 1.9
6
1998/05/1
2 16:26:40 gr
ubb
a
Exp $"
);
RCSID
(
"$Id: file.c,v 1.9
7
1998/05/1
9 20:35:39 h
ubb
e
Exp $"
);
#include
"fdlib.h"
#include
"fdlib.h"
#include
"interpret.h"
#include
"interpret.h"
#include
"svalue.h"
#include
"svalue.h"
...
@@ -2055,8 +2055,6 @@ static void init_file_locking(void)
...
@@ -2055,8 +2055,6 @@ static void init_file_locking(void)
set_exit_callback
(
exit_file_lock_key
);
set_exit_callback
(
exit_file_lock_key
);
file_lock_key_program
=
end_program
();
file_lock_key_program
=
end_program
();
file_lock_key_program
->
flags
|=
PROGRAM_DESTRUCT_IMMEDIATE
;
file_lock_key_program
->
flags
|=
PROGRAM_DESTRUCT_IMMEDIATE
;
add_function
(
"lock"
,
file_lock
,
"function(void|int:object)"
,
0
);
add_function
(
"trylock"
,
file_trylock
,
"function(void|int:object)"
,
0
);
}
}
static
void
exit_file_locking
(
void
)
static
void
exit_file_locking
(
void
)
{
{
...
@@ -2108,6 +2106,20 @@ void PIKE_CONCAT(Y,_ref) (INT32 args) {\
...
@@ -2108,6 +2106,20 @@ void PIKE_CONCAT(Y,_ref) (INT32 args) {\
#include
"file_functions.h"
#include
"file_functions.h"
#ifdef DEBUG
void
check_static_file_data
(
struct
callback
*
a
,
void
*
b
,
void
*
c
)
{
if
(
file_program
)
{
#define FILE_FUNC(X,Y,Z) \
if(PIKE_CONCAT(Y,_function_number)<0 || PIKE_CONCAT(Y,_function_number)>file_program->num_identifier_references) \
fatal(#Y "_function_number is incorrect: %d\n",PIKE_CONCAT(Y,_function_number));
#include
"file_functions.h"
}
}
#endif
void
pike_module_init
(
void
)
void
pike_module_init
(
void
)
{
{
struct
object
*
o
;
struct
object
*
o
;
...
@@ -2174,6 +2186,12 @@ void pike_module_init(void)
...
@@ -2174,6 +2186,12 @@ void pike_module_init(void)
#ifdef HAVE_OOB
#ifdef HAVE_OOB
add_integer_constant
(
"__HAVE_OOB__"
,
1
,
0
);
add_integer_constant
(
"__HAVE_OOB__"
,
1
,
0
);
#endif
#endif
#ifdef DEBUG
add_to_callback
(
&
do_debug_callbacks
,
check_static_file_data
,
0
,
0
);
#endif
}
}
/* Used from backend */
/* Used from backend */
...
...
This diff is collapsed.
Click to expand it.
src/modules/files/file_functions.h
+
5
−
0
View file @
38ac577c
...
@@ -44,4 +44,9 @@
...
@@ -44,4 +44,9 @@
FILE_FUNC
(
"proxy"
,
file_proxy
,
"function(object:void)"
)
FILE_FUNC
(
"proxy"
,
file_proxy
,
"function(object:void)"
)
#endif
#endif
#ifdef HAVE_FD_FLOCK
FILE_FUNC
(
"lock"
,
file_lock
,
"function(void|int:object)"
)
FILE_FUNC
(
"trylock"
,
file_trylock
,
"function(void|int:object)"
)
#endif
#undef FILE_FUNC
#undef FILE_FUNC
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