Move delay interface from defs.h to delay.h
* defs.h (alloc_delay_data, fill_delay_data, is_delay_timer_armed, delay_timer_expired, arm_delay_timer, delay_tcb): Move... * delay.h: ... to new file. * Makefile.am (strace_SOURCES): Add it. * filter_qualify.c: Include it. * strace.c: Likewise. * syscall.c: Likewise.
This commit is contained in:
parent
33c725f817
commit
6905f5d2bf
@ -113,6 +113,7 @@ strace_SOURCES = \
|
||||
count.c \
|
||||
defs.h \
|
||||
delay.c \
|
||||
delay.h \
|
||||
desc.c \
|
||||
dirent.c \
|
||||
dirent64.c \
|
||||
|
7
defs.h
7
defs.h
@ -1026,13 +1026,6 @@ extern const unsigned int nsyscall_vec[SUPPORTED_PERSONALITIES];
|
||||
extern const struct_sysent *const sysent_vec[SUPPORTED_PERSONALITIES];
|
||||
extern struct inject_opts *inject_vec[SUPPORTED_PERSONALITIES];
|
||||
|
||||
uint16_t alloc_delay_data(void);
|
||||
void fill_delay_data(uint16_t delay_idx, int intval, bool isenter);
|
||||
bool is_delay_timer_armed(void);
|
||||
void delay_timer_expired(void);
|
||||
void arm_delay_timer(const struct tcb *);
|
||||
void delay_tcb(struct tcb *, uint16_t delay_idx, bool isenter);
|
||||
|
||||
#ifdef IN_MPERS_BOOTSTRAP
|
||||
/* Transform multi-line MPERS_PRINTER_DECL statements to one-liners. */
|
||||
# define MPERS_PRINTER_DECL(type, name, ...) MPERS_PRINTER_DECL(type, name, __VA_ARGS__)
|
||||
|
38
delay.h
Normal file
38
delay.h
Normal file
@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright (c) 2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef STRACE_DELAY_H
|
||||
#define STRACE_DELAY_H
|
||||
|
||||
uint16_t alloc_delay_data(void);
|
||||
void fill_delay_data(uint16_t delay_idx, int intval, bool isenter);
|
||||
bool is_delay_timer_armed(void);
|
||||
void delay_timer_expired(void);
|
||||
void arm_delay_timer(const struct tcb *);
|
||||
void delay_tcb(struct tcb *, uint16_t delay_idx, bool isenter);
|
||||
|
||||
#endif /* !STRACE_DELAY_H */
|
@ -30,6 +30,7 @@
|
||||
#include "nsig.h"
|
||||
#include "number_set.h"
|
||||
#include "filter.h"
|
||||
#include "delay.h"
|
||||
#include "retval.h"
|
||||
|
||||
struct number_set *read_set;
|
||||
|
1
strace.c
1
strace.c
@ -57,6 +57,7 @@
|
||||
#include "printsiginfo.h"
|
||||
#include "trace_event.h"
|
||||
#include "xstring.h"
|
||||
#include "delay.h"
|
||||
|
||||
/* In some libc, these aren't declared. Do it ourself: */
|
||||
extern char **environ;
|
||||
|
Loading…
x
Reference in New Issue
Block a user