Gitiles
Code Review
Sign In
gerrit-public.fairphone.software
/
kernel
/
msm-4.9
/
fe455b17de6c881eecf4f9784c3b0483a5e3d19e
/
.
/
tools
/
perf
/
config
/
feature-checks
/
test-on-exit.c
blob: 8e88b16e6ded0a799038b3ce91ee7cf772d01031 [
file
] [
log
] [
blame
]
#include
<stdio.h>
#include
<stdlib.h>
static
void
exit_fn
(
int
status
,
void
*
__data
)
{
printf
(
"exit status: %d, data: %d\n"
,
status
,
*(
int
*)
__data
);
}
static
int
data
=
123
;
int
main
(
void
)
{
on_exit
(
exit_fn
,
&
data
);
return
321
;
}