@@ -170,13 +170,13 @@ There must be a function to check for syscall driver existence.
170
170
Signature:
171
171
172
172
```
173
- bool libtock_[name]_exists (void);
173
+ bool libtock_[name]_driver_exists (void);
174
174
```
175
175
176
176
Example:
177
177
178
178
``` c
179
- bool libtock_[name]_exists (void ) {
179
+ bool libtock_[name]_driver_exists (void ) {
180
180
return driver_exists(DRIVER_NUM_ [ NAME] );
181
181
}
182
182
```
@@ -202,7 +202,6 @@ The `[name].h` header file must look like:
202
202
#pragma once
203
203
204
204
#include " ../tock.h"
205
- #include " syscalls/[name]_syscalls.h"
206
205
207
206
#ifdef __cplusplus
208
207
extern "C" {
@@ -215,7 +214,8 @@ extern "C" {
215
214
#endif
216
215
```
217
216
218
- The ` [name].h ` header file must include the syscalls header.
217
+ The ` [name].h ` header file must NOT include the syscalls header. Applications
218
+ wanting to use the syscalls directly must include the syscalls header.
219
219
220
220
### Defining a Callback for Asynchronous Operations
221
221
@@ -236,6 +236,24 @@ they should have the last argument be a callback function pointer.
236
236
returncode_t libtock_[name]_[desc](<arguments>, libtock_[name]_callback_[desc] cb);
237
237
```
238
238
239
+ #### Exists
240
+
241
+ There must be a function to check for syscall driver existence.
242
+
243
+ Signature:
244
+
245
+ ```
246
+ bool libtock_[name]_exists(void);
247
+ ```
248
+
249
+ Example:
250
+
251
+ ``` c
252
+ bool libtock_[name]_exists(void ) {
253
+ return libtock_ [ name] _ driver_exists();
254
+ }
255
+ ```
256
+
239
257
### Example:
240
258
241
259
@@ -309,7 +327,6 @@ file is used in a C++ app.
309
327
#pragma once
310
328
311
329
#include <libtock/tock.h>
312
- #include <libtock/[category]/syscalls/[name]_syscalls.h>
313
330
314
331
#ifdef __cplusplus
315
332
extern "C" {
@@ -379,7 +396,6 @@ The libtock-sync `[name].h` header file must look like:
379
396
``` c
380
397
#pragma once
381
398
382
- #include " syscalls/temperature_syscalls.h"
383
399
#include < libtock/tock.h>
384
400
385
401
#ifdef __cplusplus
0 commit comments