aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>2018-06-14 14:46:04 +0200
committerJonathan Neuschäfer <j.neuschaefer@gmx.net>2018-06-14 14:46:04 +0200
commite340252d25e019b7c69191e101b2212a16d5b0bb (patch)
treec613438a22319f7a292bbaf4d5eb0d440e24374e
parentselftest/mpmc_ring: Remove const qualifier from mpmc_ptr_ring_produce argument (diff)
downloadwireguard-monolithic-historical-e340252d25e019b7c69191e101b2212a16d5b0bb.tar.xz
wireguard-monolithic-historical-e340252d25e019b7c69191e101b2212a16d5b0bb.zip
selftest/mpmc_ring: Add more __init/__initdata annotations
The main function, mpmc_ring_selftest, is already marked with __init, but the callback functions and the ring pointer were not.
-rw-r--r--src/selftest/mpmc_ring.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/selftest/mpmc_ring.h b/src/selftest/mpmc_ring.h
index 41ea9f9..251456f 100644
--- a/src/selftest/mpmc_ring.h
+++ b/src/selftest/mpmc_ring.h
@@ -20,7 +20,7 @@
#define PER_CONSUMER (ELEMENT_COUNT/THREADS_CONSUMER)
#define THREADS_TOTAL (THREADS_PRODUCER + THREADS_CONSUMER)
-struct mpmc_ptr_ring *ring;
+struct mpmc_ptr_ring *ring __initdata;
struct worker_producer {
struct work_struct work;
@@ -34,7 +34,7 @@ struct worker_consumer {
long count;
};
-static void producer_function(struct work_struct *work)
+static __init void producer_function(struct work_struct *work)
{
struct worker_producer *td = container_of(work, struct worker_producer, work);
uintptr_t count = (td->thread_num * PER_PRODUCER) + 1;
@@ -45,7 +45,7 @@ static void producer_function(struct work_struct *work)
}
}
-static void consumer_function(struct work_struct *work)
+static __init void consumer_function(struct work_struct *work)
{
struct worker_consumer *td = container_of(work, struct worker_consumer, work);
int i;