Overview
Comment: | Implement conditions for win32. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
b5e6a49dca4a59d5f92d9b9b1996902e |
User & Date: | js on 2011-03-11 12:15:18 |
Other Links: | manifest | tags |
Context
2011-03-11
| ||
12:29 | Create an autorelease pool before calling blocks. check-in: 44f8152a03 user: js tags: trunk | |
12:15 | Implement conditions for win32. check-in: b5e6a49dca user: js tags: trunk | |
2011-03-10
| ||
20:34 | Improve namespace handling. check-in: a95ca84f7e user: js tags: trunk | |
Changes
Modified src/threading.h from [0b981f818f] to [33ef5dc30b].
︙ | |||
29 30 31 32 33 34 35 36 37 38 39 40 41 42 | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | + + + + | typedef pthread_mutex_t of_mutex_t; typedef pthread_cond_t of_condition_t; #elif defined(_WIN32) # include <windows.h> typedef HANDLE of_thread_t; typedef DWORD of_tlskey_t; typedef CRITICAL_SECTION of_mutex_t; typedef struct { HANDLE event; int count; } of_condition_t; #endif #if defined(OF_ATOMIC_OPS) # import "atomic.h" typedef volatile int of_spinlock_t; # define OF_SPINCOUNT 10 #elif defined(OF_HAVE_PTHREAD_SPINLOCKS) |
︙ | |||
153 154 155 156 157 158 159 | 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 | + - + + + + + + + - + + + + + + + + + + + + + + - + + - + + + + + + + + - + + | static OF_INLINE BOOL of_condition_new(of_condition_t *condition) { #if defined(OF_HAVE_PTHREADS) return (pthread_cond_init(condition, NULL) ? NO : YES); #elif defined(_WIN32) condition->count = 0; |
︙ |