Skip to content

Commit a555412

Browse files
authored
Trying some variants out, confused…
1 parent e55abf5 commit a555412

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

libtock/tock.h

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -194,26 +194,23 @@ yield_waitfor_return_t yield_wait_for(uint32_t driver, uint32_t subscribe);
194194
void tock_exit(uint32_t completion_code) __attribute__ ((noreturn));
195195
void tock_restart(uint32_t completion_code) __attribute__ ((noreturn));
196196

197-
[[ gnu::nodiscard ]]
197+
[[ nodiscard("does this help") ]]
198198
syscall_return_t command(uint32_t driver, uint32_t command, int arg1, int arg2);
199199

200200
// Pass this to the subscribe syscall as a function pointer to
201201
// be the Null Upcall.
202202
#define TOCK_NULL_UPCALL 0
203203

204-
[[ gnu::nodiscard ]]
204+
[[nodiscard("or this")]]
205205
subscribe_return_t subscribe(uint32_t driver, uint32_t subscribe, subscribe_upcall uc, void* userdata);
206206

207-
[[ gnu::nodiscard ]]
208-
allow_rw_return_t allow_readwrite(uint32_t driver, uint32_t allow, void* ptr, size_t size);
207+
[[ nodiscard ]] allow_rw_return_t allow_readwrite(uint32_t driver, uint32_t allow, void* ptr, size_t size);
209208

210-
[[ gnu::nodiscard ]]
211-
allow_userspace_r_return_t allow_userspace_read(uint32_t driver,
209+
[[nodiscard]] allow_userspace_r_return_t allow_userspace_read(uint32_t driver,
212210
uint32_t allow, void* ptr,
213211
size_t size);
214212

215-
[[ gnu::nodiscard ]]
216-
allow_ro_return_t allow_readonly(uint32_t driver, uint32_t allow, const void* ptr, size_t size);
213+
allow_ro_return_t [[nodiscard]] allow_readonly(uint32_t driver, uint32_t allow, const void* ptr, size_t size);
217214

218215
// Call the memop syscall.
219216
memop_return_t memop(uint32_t op_type, int arg1);

0 commit comments

Comments
 (0)