Skip to content

Commit

Permalink
selftests: xsx: Make pthreads local scope
Browse files Browse the repository at this point in the history
Make the pthread_t variables local scope instead of global. No reason
for them to be global.

Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Link: https://lore.kernel.org/bpf/20210907071928.9750-14-magnus.karlsson@gmail.com
  • Loading branch information
Magnus Karlsson authored and Daniel Borkmann committed Sep 10, 2021
1 parent af6731d commit e2d850d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions tools/testing/selftests/bpf/xdpxceiver.c
Original file line number Diff line number Diff line change
Expand Up @@ -887,6 +887,7 @@ static void testapp_validate_traffic(struct test_spec *test)
struct ifobject *ifobj_tx = test->ifobj_tx;
struct ifobject *ifobj_rx = test->ifobj_rx;
struct pkt_stream *pkt_stream;
pthread_t t0, t1;

if (pthread_barrier_init(&barr, NULL, 2))
exit_with_error(errno);
Expand Down
2 changes: 0 additions & 2 deletions tools/testing/selftests/bpf/xdpxceiver.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ struct test_spec {
char name[MAX_TEST_NAME_SIZE];
};

/*threads*/
pthread_barrier_t barr;
pthread_t t0, t1;

#endif /* XDPXCEIVER_H */

0 comments on commit e2d850d

Please sign in to comment.