Changeset c1a9c86 for src/libcfa/concurrency/monitor.c
- Timestamp:
- Nov 2, 2017, 5:59:12 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 59a0bde
- Parents:
- 513daec
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/monitor.c
r513daec rc1a9c86 296 296 297 297 // Save previous thread context 298 this.prev_mntrs = this_thread->monitors.list; 299 this.prev_count = this_thread->monitors.size; 300 this.prev_func = this_thread->monitors.func; 298 this.[prev_mntrs, prev_count, prev_func] = this_thread->monitors.[list, size, func]; 301 299 302 300 // Update thread context (needed for conditions) 303 this_thread->monitors.list = m; 304 this_thread->monitors.size = count; 305 this_thread->monitors.func = func; 301 this_thread->monitors.[list, size, func] = [m, count, func]; 306 302 307 303 // LIB_DEBUG_PRINT_SAFE("MGUARD : enter %d\n", count); … … 325 321 326 322 // Restore thread context 327 this_thread->monitors.list = this.prev_mntrs; 328 this_thread->monitors.size = this.prev_count; 329 this_thread->monitors.func = this.prev_func; 323 this_thread->monitors.[list, size, func] = this.[prev_mntrs, prev_count, prev_func]; 330 324 } 331 325 … … 337 331 338 332 // Save previous thread context 339 this.prev_mntrs = this_thread->monitors.list; 340 this.prev_count = this_thread->monitors.size; 341 this.prev_func = this_thread->monitors.func; 333 this.[prev_mntrs, prev_count, prev_func] = this_thread->monitors.[list, size, func]; 342 334 343 335 // Update thread context (needed for conditions) 344 this_thread->monitors.list = m; 345 this_thread->monitors.size = 1; 346 this_thread->monitors.func = func; 336 this_thread->monitors.[list, size, func] = [m, 1, func]; 347 337 348 338 __enter_monitor_dtor( this.m, func ); … … 355 345 356 346 // Restore thread context 357 this_thread->monitors.list = this.prev_mntrs; 358 this_thread->monitors.size = this.prev_count; 359 this_thread->monitors.func = this.prev_func; 347 this_thread->monitors.[list, size, func] = this.[prev_mntrs, prev_count, prev_func]; 360 348 } 361 349
Note: See TracChangeset
for help on using the changeset viewer.