Prv8 Shell
Server : Apache
System : Linux server.mata-lashes.com 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64
User : matalashes ( 1004)
PHP Version : 8.1.29
Disable Function : NONE
Directory :  /usr/share/systemtap/runtime/linux/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/systemtap/runtime/linux/autoconf-relay_buf-per_cpu_ptr.c
//
// The following kernel commit:
//
// commit 017c59c042d01fc84cae7a8ea475861e702c77ab
// Author: Akash Goel <akash.goel@intel.com>
// Date:   Fri Sep 2 21:47:38 2016 +0200
//
//     relay: Use per CPU constructs for the relay channel buffer pointers
//
//     relay essentially needs to maintain a per CPU array of channel buffer
//     pointers but it manually creates that array.  Instead its better to use
//     the per CPU constructs, provided by the kernel, to allocate & access the
//     array of pointer to channel buffers.
//
// changed the way the 'rchan->buf' field works. It just to be a
// regular array, and is now a per_cpu_ptr-style array.

#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);
}

haha - 2025