Changeset 08f3ad3 for libcfa/src/concurrency/io/types.hfa
- Timestamp:
- Sep 21, 2020, 11:37:28 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 7a80113
- Parents:
- 31a6f38 (diff), ace2e92 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/io/types.hfa
r31a6f38 r08f3ad3 16 16 #pragma once 17 17 18 extern "C" { 19 #include <linux/types.h> 20 } 21 22 #include "bits/locks.hfa" 23 18 24 #if defined(CFA_HAVE_LINUX_IO_URING_H) 19 extern "C" {20 #include <linux/types.h>21 }22 23 #include "bits/locks.hfa"24 25 25 #define LEADER_LOCK 26 26 struct __leaderlock_t { … … 101 101 }; 102 102 103 104 //-----------------------------------------------------------------------105 // IO user data106 struct __io_user_data_t {107 __s32 result;108 oneshot sem;109 };110 111 103 //----------------------------------------------------------------------- 112 104 // Misc … … 143 135 void __ioctx_prepare_block($io_ctx_thread & ctx, struct epoll_event & ev); 144 136 #endif 137 138 //----------------------------------------------------------------------- 139 // IO user data 140 struct io_future_t { 141 future_t self; 142 __s32 result; 143 }; 144 145 static inline { 146 bool fulfil( io_future_t & this, __s32 result ) { 147 this.result = result; 148 return fulfil(this.self); 149 } 150 151 // Wait for the future to be fulfilled 152 bool wait( io_future_t & this ) { 153 return wait(this.self); 154 } 155 }
Note: See TracChangeset
for help on using the changeset viewer.