Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zipr_callbacks
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
Service Desk
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Open Source Software
zipr_callbacks
Commits
78eeee6a
Commit
78eeee6a
authored
9 years ago
by
whh8b
Browse files
Options
Downloads
Patches
Plain Diff
Add initial cookbook callbacks.
parent
af98ec72
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitattributes
+2
-0
2 additions, 0 deletions
.gitattributes
cookbook/Makefile.in
+28
-0
28 additions, 0 deletions
cookbook/Makefile.in
cookbook/instructionCountCallback.c
+43
-0
43 additions, 0 deletions
cookbook/instructionCountCallback.c
with
73 additions
and
0 deletions
.gitattributes
+
2
−
0
View file @
78eeee6a
...
@@ -9,6 +9,8 @@ canaries/debug_canary_callbacks.c -text
...
@@ -9,6 +9,8 @@ canaries/debug_canary_callbacks.c -text
/configure_for_cgc -text
/configure_for_cgc -text
/configure_for_cinderella -text
/configure_for_cinderella -text
/configure_for_rss -text
/configure_for_rss -text
cookbook/Makefile.in -text
cookbook/instructionCountCallback.c -text
example/Makefile.in -text
example/Makefile.in -text
example/callback.c -text
example/callback.c -text
hookdynamic/Makefile.in -text
hookdynamic/Makefile.in -text
...
...
This diff is collapsed.
Click to expand it.
cookbook/Makefile.in
0 → 100644
+
28
−
0
View file @
78eeee6a
CC
=
@CC@
CFLAGS
=
@CFLAGS@
LIB
=
@LIB@
AR
=
@AR@
AS
=
@AS@
ASFLAGS
=
@ASFLAGS@
OBJS
=
instructionCountCallback.o
.SUFFIXES
:
.o .s .c
.c.o
:
$(
CC
)
$(
CFLAGS
)
$(
INCLUDE
)
-D__
$(
ARCH
)
-c
$<
.s.o
:
$(
AS
)
$(
ASFLAGS
)
$<
all
:
$(OBJS)
$(
AR
)
-r
$(
LIB
)
$(
OBJS
)
clean
:
rm
*
.o
This diff is collapsed.
Click to expand it.
cookbook/instructionCountCallback.c
0 → 100644
+
43
−
0
View file @
78eeee6a
#include
<stdint.h>
#ifdef DEBUG
#include
"malloc.h"
#include
"itox.h"
#include
"strlen.h"
#include
"null.h"
#endif
#define DEBUG_ADD
static
unsigned
long
long
instructioncounter
=
0LL
;
#ifdef DEBUG
#define print_str_debug callbacks_print_str
#define print_int_debug callbacks_print_int
#define print_unsigned_long_long_debug callbacks_print_unsigned_long_long
#else
#define print_str_debug(a)
#define print_int_debug(a)
#define assert(a)
#endif
#ifdef DEBUG
#define write_fd 2
void
callbacks_print_unsigned_long_long
(
unsigned
long
long
x
)
{
char
buf
[
100
];
itox
(
x
,
buf
);
write
(
write_fd
,
buf
,
strlen
(
buf
));
}
void
callbacks_print_str
(
char
*
s
)
{
write
(
write_fd
,
s
,
strlen
(
s
));
}
#endif
void
count_instruction
()
{
instructioncounter
++
;
print_str_debug
(
"instructioncounter:"
);
print_unsigned_long_long_debug
(
instructioncounter
);
print_str_debug
(
"
\n
"
);
}
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