Fixing up some overlapped completion routine stuff.

This commit is contained in:
Ben Vanik
2015-05-14 16:35:29 -07:00
parent a1fb99f1d3
commit 46eedeab01
6 changed files with 48 additions and 18 deletions

View File

@@ -212,10 +212,18 @@ enum X_FILE_INFORMATION_CLASS {
XFileMaximumInformation
};
inline uint32_t XOverlappedGetResult(void* ptr) {
auto p = reinterpret_cast<uint32_t*>(ptr);
return xe::load_and_swap<uint32_t>(&p[0]);
}
inline void XOverlappedSetResult(void* ptr, uint32_t value) {
auto p = reinterpret_cast<uint32_t*>(ptr);
xe::store_and_swap<uint32_t>(&p[0], value);
}
inline uint32_t XOverlappedGetLength(void* ptr) {
auto p = reinterpret_cast<uint32_t*>(ptr);
return xe::load_and_swap<uint32_t>(&p[1]);
}
inline void XOverlappedSetLength(void* ptr, uint32_t value) {
auto p = reinterpret_cast<uint32_t*>(ptr);
xe::store_and_swap<uint32_t>(&p[1], value);