406 |
stream_mode_t Mode; ///< State of handles (ro, rw, closed). |
stream_mode_t Mode; ///< State of handles (ro, rw, closed). |
407 |
}; |
}; |
408 |
struct IO : HandlePair { |
struct IO : HandlePair { |
409 |
|
bool isPerThread; ///< Whether SetIOPerThread(true) was called. |
410 |
mutable std::map<std::thread::id,HandlePair> byThread; ///< Optional: Individual file handle pair for each thread separately. |
mutable std::map<std::thread::id,HandlePair> byThread; ///< Optional: Individual file handle pair for each thread separately. |
411 |
mutable std::mutex mutex; ///< For protecting concurrent changes on the @c byThread map itself and replacing handles. |
mutable std::mutex mutex; ///< For protecting concurrent changes on the @c byThread map itself and replacing handles. |
412 |
} io; |
} io; |
435 |
int FileOffsetSizeFor(file_offset_t fileSize) const; |
int FileOffsetSizeFor(file_offset_t fileSize) const; |
436 |
void Cleanup(); |
void Cleanup(); |
437 |
HandlePair& FileHandlePairUnsafeRef(); |
HandlePair& FileHandlePairUnsafeRef(); |
438 |
|
bool SetModeInternal(stream_mode_t NewMode, bool* pResetPos); |
439 |
}; |
}; |
440 |
|
|
441 |
/** |
/** |