Skip to content

Commit

Permalink
cleanup: remove legacy macros
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea Terzolo <[email protected]>
  • Loading branch information
Andreagit97 committed Nov 12, 2024
1 parent caba65b commit e9fa30a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
11 changes: 0 additions & 11 deletions driver/ppm_events_public.h
Original file line number Diff line number Diff line change
Expand Up @@ -1048,17 +1048,6 @@ or GPL2.txt for full copies of the license.
#define _STK_LIM_MAX RLIM_INFINITY
#endif

/*
* The list of event types
* Enter events have even numbers while exit events have odd numbers.
* NOTE: there can't be gaps in the numbering, because these numbers correspond
* to the entries in the g_event_info table
*/
#define PPME_DIRECTION_FLAG 1
#define PPME_IS_ENTER(x) ((x & PPME_DIRECTION_FLAG) == 0)
#define PPME_IS_EXIT(x) (x & PPME_DIRECTION_FLAG)
#define PPME_MAKE_ENTER(x) (x & (~1))

/*
* Event category to classify events in generic categories
*/
Expand Down
6 changes: 6 additions & 0 deletions userspace/libscap/examples/01-open/scap_open.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ limitations under the License.

#define SYSCALL_NAME_MAX_LEN 40

/*
* Legacy event types (todo!: remove it at the end of the work)
* Enter events have even numbers while exit events have odd numbers.
*/
#define PPME_IS_ENTER(x) ((x & 1) == 0)

/* SCAP SOURCES */
#define KMOD_OPTION "--kmod"
#define BPF_OPTION "--bpf"
Expand Down

0 comments on commit e9fa30a

Please sign in to comment.