Changeset 930e57e for libcfa/src/concurrency/io/types.hfa
- Timestamp:
- Sep 21, 2020, 3:59:03 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:
- 0e52f14
- Parents:
- 0519e34
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/io/types.hfa
r0519e34 r930e57e 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_future_t {107 future_t self;108 __s32 result;109 };110 111 static inline {112 bool fulfil( io_future_t & this, __s32 result ) {113 this.result = result;114 return fulfil(this.self);115 }116 117 // Wait for the future to be fulfilled118 bool wait( io_future_t & this ) {119 return wait(this.self);120 }121 }122 123 103 //----------------------------------------------------------------------- 124 104 // Misc … … 155 135 void __ioctx_prepare_block($io_ctx_thread & ctx, struct epoll_event & ev); 156 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.