projects
/
akaros.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Add signal support to our basic thread0 scheduler
[akaros.git]
/
scripts
/
spatch
/
plan9.cocci
1
@ print@
2
@@
3
-print(
4
+printd(
5
...)
6
7
@ kopen@
8
@@
9
-kopen(
10
+sysopen(
11
...)
12
13
@ kclose @
14
@@
15
-kclose(
16
+sysclose(
17
...)
18
19
@ kread@
20
@@
21
-kread(
22
+sysread(
23
...)
24
25
@ qnoblock@
26
@@
27
-qnoblock(
28
+qdropoverflow(
29
...)
30
31
@ channel @
32
identifier d;
33
@@
34
-Chan
35
+struct chan
36
d;
37
38
@ channelstar @
39
identifier d;
40
@@
41
-Chan *
42
+struct chan *
43
d;
44
45
@mount@
46
identifier d;
47
@@
48
-Mount
49
+struct mount
50
d;
51
52
@ mountstar @
53
identifier d;
54
@@
55
-Chan *
56
+struct mount *
57
d;
58
59
@uvlong@
60
identifier d;
61
@@
62
-uvlong
63
+uint64_t
64
d;
65
@vlong@
66
identifier d;
67
@@
68
-vlong
69
+int64_t
70
d;
71
@ulong@
72
identifier d;
73
@@
74
-ulong
75
+uint32_t
76
d;
77
@ushort@
78
identifier d;
79
@@
80
-ushort
81
+uint16_t
82
d;
83
84
@ rulesm @
85
identifier t;
86
identifier f;
87
expression E1;
88
type T;
89
@@
90
T f(...){<...
91
t = smalloc(E1);
92
...>}
93
@@
94
identifier rulesm.f;
95
expression E1;
96
@@
97
98
- smalloc(E1
99
+ kzmalloc(E1, 0
100
)
101
102
@ rulem @
103
identifier t;
104
identifier f;
105
expression E1;
106
type T;
107
@@
108
T f(...){<...
109
t = malloc(E1);
110
...>}
111
@@
112
identifier rulem.f;
113
expression E1;
114
@@
115
116
- malloc(E1
117
+ kzmalloc(E1, 0
118
)
119
120
@@
121
@@
122
-getcallerpc(...);
123
@@
124
@@
125
-setmalloctag(...);
126
127
@@
128
type T;
129
@@
130
-T validname0(...){...}
131
132
@@
133
type T;
134
@@
135
-T kstrcpy(...){...}
136
137
@@
138
@@
139
-if (up){
140
+if (current){
141
... } else {...}
142
143
@@
144
expression E;
145
@@
146
-strcpy(up->errstr,
147
+set_errstr(
148
E)
149
@@
150
@@
151
-saveregisters(...);
152
@@
153
@@
154
-saveregisters(...){...}
155
@@
156
@@
157
+//
158
muxclose(...);