回答編集履歴

2

修正

2020/04/15 10:31

投稿

asm
asm

スコア15147

test CHANGED
@@ -36,9 +36,9 @@
36
36
 
37
37
  ```s
38
38
 
39
- -> TI_TASK 0 offsetof(struct thread_info, task)
39
+ -> TI_TASK $0 offsetof(struct thread_info, task)
40
40
 
41
- -> TI_FLAGS 16 offsetof(struct thread_info, flags)
41
+ -> TI_FLAGS $16 offsetof(struct thread_info, flags)
42
42
 
43
43
  ```
44
44
 

1

追記

2020/04/15 10:31

投稿

asm
asm

スコア15147

test CHANGED
@@ -11,3 +11,47 @@
11
11
  そのために、インラインアセンブラの`.s`生成機能を文書生成機として用い
12
12
 
13
13
  `sed`によって置換を行っています。
14
+
15
+
16
+
17
+
18
+
19
+ ---
20
+
21
+
22
+
23
+ ```c
24
+
25
+ DEFINE(TI_TASK, offsetof(struct thread_info, task));
26
+
27
+ DEFINE(TI_FLAGS, offsetof(struct thread_info, flags));
28
+
29
+ ```
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+ ```s
38
+
39
+ -> TI_TASK 0 offsetof(struct thread_info, task)
40
+
41
+ -> TI_FLAGS 16 offsetof(struct thread_info, flags)
42
+
43
+ ```
44
+
45
+
46
+
47
+
48
+
49
+
50
+
51
+ ```c
52
+
53
+ #define TI_TASK 0 /* offsetof(struct thread_info, task) */
54
+
55
+ #define TI_FLAGS 16 /* offsetof(struct thread_info, flags) */
56
+
57
+ ```