]> sourceware.org Git - systemtap.git/commitdiff
Improve relayfs autoconf test for F24.
authorDavid Smith <dsmith@redhat.com>
Wed, 14 Dec 2016 16:07:15 +0000 (10:07 -0600)
committerDavid Smith <dsmith@redhat.com>
Wed, 14 Dec 2016 16:07:15 +0000 (10:07 -0600)
* runtime/linux/autoconf-relay_buf-per_cpu_ptr.c: Improve test so that it
  properly fails on Fedora 24's 4.8.10-200.fc24.x86_64 kernel.

runtime/linux/autoconf-relay_buf-per_cpu_ptr.c

index d2af8d32d81cdc1fc97235c143eb2e33a578c092..c105b33014c23b57243a06af0049c3fbfe542156 100644 (file)
 //
 // changed the way the 'rchan->buf' field works. It just to be a
 // regular array, and is now a per_cpu_ptr-style array.
-//
-// If we can call per_cpu_ptr() on rchan->buf, we'll assume that we've
-// got the new style relay channel buffer pointers.
 
 #include <linux/relay.h>
 #include <linux/percpu.h>
+#include <linux/bug.h>
 
 struct rchan_buf *relay_buf_test(struct rchan *chan, unsigned int cpu)
 {
+    BUILD_BUG_ON(sizeof(chan->buf) != sizeof(struct rchan_buf **));
     return *per_cpu_ptr(chan->buf, cpu);
 }
This page took 0.027971 seconds and 5 git commands to generate.