Skip to content

Commit

Permalink
Merge pull request #1249 from likewhatevs/lsp-cleanup
Browse files Browse the repository at this point in the history
[scx-layered] misc. lsp cleanup
  • Loading branch information
likewhatevs authored Jan 27, 2025
2 parents 927a093 + 86a9dcc commit a3607dc
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion scheds/rust/scx_layered/src/bpf/main.bpf.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* Copyright (c) Meta Platforms, Inc. and affiliates. */

#ifdef LSP
#ifndef __bpf__
#define __bpf__
#endif
#define LSP_INC
#include "../../../../include/scx/common.bpf.h"
#include "../../../../include/scx/namespace_impl.bpf.h"
#else
Expand Down
3 changes: 1 addition & 2 deletions scheds/rust/scx_layered/src/bpf/timer.bpf.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
/* Copyright (c) Meta Platforms, Inc. and affiliates. */

#ifdef LSP
#ifndef __bpf__
#define __bpf__
#endif

#if defined LSP && defined LSP_INC
#include "../../../../include/scx/common.bpf.h"
#else
#include <scx/common.bpf.h>
Expand Down
8 changes: 6 additions & 2 deletions scheds/rust/scx_layered/src/bpf/timer.bpf.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
/* Copyright (c) Meta Platforms, Inc. and affiliates. */
#ifndef __LAYERED_TIMER_H
#define __LAYERED_TIMER_H

#ifdef LSP
#ifndef __bpf__
#define __bpf__
#ifndef LSP_INC
#include "../../../../include/scx/common.bpf.h"
#endif
#include "../../../../include/scx/common.bpf.h"
#else
#include <scx/common.bpf.h>
#endif

#include <bpf/bpf_core_read.h>
#include <bpf/bpf_helpers.h>
#include <bpf/bpf_tracing.h>
Expand Down
2 changes: 1 addition & 1 deletion scheds/rust/scx_layered/src/bpf/util.bpf.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

#ifdef LSP
#ifndef __bpf__
#define __bpf__
#endif
#define LSP_INC
#include "../../../../include/scx/common.bpf.h"
#else
#include <scx/common.bpf.h>
Expand Down
8 changes: 6 additions & 2 deletions scheds/rust/scx_layered/src/bpf/util.bpf.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
/* Copyright (c) Meta Platforms, Inc. and affiliates. */
#ifndef __LAYERED_UTIL_H
#define __LAYERED_UTIL_H

#ifdef LSP
#ifndef __bpf__
#define __bpf__
#ifndef LSP_INC
#include "../../../../include/scx/common.bpf.h"
#endif
#include "../../../../include/scx/common.bpf.h"
#else
#include <scx/common.bpf.h>
#endif

#include <bpf/bpf_core_read.h>
#include <bpf/bpf_helpers.h>
#include <bpf/bpf_tracing.h>
Expand Down

0 comments on commit a3607dc

Please sign in to comment.