diff options
| author | Mike Buland <mike@xagasoft.com> | 2024-11-06 16:01:36 -0800 |
|---|---|---|
| committer | Mike Buland <mike@xagasoft.com> | 2024-11-06 16:01:36 -0800 |
| commit | 700d4bbcbf59c4447becbab21a6aa7204a8da2f4 (patch) | |
| tree | ae68c40a5af2d5bc84ac4bbb192fbbda893d64cc /src/unstable/myriadfs.h | |
| parent | 6403224b6fe50dfc28d3c25725b6d0910b7eb6c3 (diff) | |
| download | libbu++-myriad.tar.gz libbu++-myriad.tar.bz2 libbu++-myriad.tar.xz libbu++-myriad.zip | |
I believe MyriadFs is now threadsafe.myriad
It could probably be more optimized, but it does work.
Diffstat (limited to 'src/unstable/myriadfs.h')
| -rw-r--r-- | src/unstable/myriadfs.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/unstable/myriadfs.h b/src/unstable/myriadfs.h index 4e1749e..e3008bc 100644 --- a/src/unstable/myriadfs.h +++ b/src/unstable/myriadfs.h | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | #include <sys/types.h> | 11 | #include <sys/types.h> |
| 12 | 12 | ||
| 13 | #include "bu/myriad.h" | 13 | #include "bu/myriad.h" |
| 14 | #include "bu/mutex.h" | 14 | #include "bu/debugmutex.h" |
| 15 | 15 | ||
| 16 | namespace Bu | 16 | namespace Bu |
| 17 | { | 17 | { |
| @@ -172,7 +172,13 @@ namespace Bu | |||
| 172 | typedef Bu::Hash<int32_t, int32_t> NodeIndex; | 172 | typedef Bu::Hash<int32_t, int32_t> NodeIndex; |
| 173 | 173 | ||
| 174 | private: | 174 | private: |
| 175 | /** | ||
| 176 | * Lookup inode. | ||
| 177 | */ | ||
| 175 | int32_t lookupInode( const Bu::String &sPath, int32_t &iParent ); | 178 | int32_t lookupInode( const Bu::String &sPath, int32_t &iParent ); |
| 179 | /** | ||
| 180 | * Lookup inode. | ||
| 181 | */ | ||
| 176 | int32_t lookupInode( Bu::String::const_iterator iStart, | 182 | int32_t lookupInode( Bu::String::const_iterator iStart, |
| 177 | int32_t iNode, int32_t &iParent ); | 183 | int32_t iNode, int32_t &iParent ); |
| 178 | void readInode( int32_t iNode, RawStat &rs, MyriadStream &rIs ); | 184 | void readInode( int32_t iNode, RawStat &rs, MyriadStream &rIs ); |
| @@ -190,12 +196,12 @@ namespace Bu | |||
| 190 | void setTimes( int32_t iNode, int64_t iATime, int64_t iMTime ); | 196 | void setTimes( int32_t iNode, int64_t iATime, int64_t iMTime ); |
| 191 | void destroyNode( int32_t iNode ); | 197 | void destroyNode( int32_t iNode ); |
| 192 | 198 | ||
| 193 | Bu::String filePart( const Bu::String &sPath ); | 199 | static Bu::String filePart( const Bu::String &sPath ); |
| 194 | 200 | ||
| 195 | private: | 201 | private: |
| 196 | Bu::Stream &rStore; | 202 | Bu::Stream &rStore; |
| 197 | Bu::Myriad mStore; | 203 | Bu::Myriad mStore; |
| 198 | Bu::Mutex mAccess; | 204 | Bu::DebugMutex mAccess; |
| 199 | NodeIndex hNodeIndex; | 205 | NodeIndex hNodeIndex; |
| 200 | int32_t iUser; | 206 | int32_t iUser; |
| 201 | int32_t iGroup; | 207 | int32_t iGroup; |
