File: autoconf-task-state.c

package info (click to toggle)
systemtap 5.1-5
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 47,964 kB
  • sloc: cpp: 80,838; ansic: 54,757; xml: 49,725; exp: 43,665; sh: 11,527; python: 5,003; perl: 2,252; tcl: 1,312; makefile: 1,006; javascript: 149; lisp: 105; awk: 101; asm: 91; java: 70; sed: 16
file content (20 lines) | stat: -rw-r--r-- 595 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
 * Is this a kernel prior to the following kernel commit:
 *
 * commit	2f064a59a11ff9bc22e52e9678bc601404c7cb34
 * Author:	Peter Zijlstra <peterz@infradead.org>
 * Date:	2021-06-11 10:28:17 +0200
 *
 * sched: Change task_struct::state
 * Change the type and name of task_struct::state. Drop the volatile and
 * shrink it to an 'unsigned int'. Rename it in order to find all uses
 * such that we can use READ_ONCE/WRITE_ONCE as appropriate.
 */

#include <linux/sched.h>

unsigned int bar (struct task_struct *foo);

unsigned int bar (struct task_struct *foo) { 
  return (foo->state = 0); 
}