Changeset 7e7a076 for libcfa


Ignore:
Timestamp:
Sep 24, 2021, 6:12:15 PM (3 years ago)
Author:
caparsons <caparson@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
Children:
f93c50a
Parents:
4d8fbf4
Message:

added routines so fstreams could be acquired with the mutex stmt

Location:
libcfa/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/fstream.cfa

    r4d8fbf4 r7e7a076  
    187187} // release
    188188
     189inline void lock( ofstream & os ) { acquire( os ); }
     190inline void unlock( ofstream & os ) { release( os ); }
     191
    189192void ?{}( osacquire & acq, ofstream & os ) { &acq.os = &os; lock( os.lock$ ); }
    190193void ^?{}( osacquire & acq ) { release( acq.os ); }
  • libcfa/src/fstream.hfa

    r4d8fbf4 r7e7a076  
    8080void release( ofstream & );
    8181
     82void lock( ofstream & );
     83void unlock( ofstream & );
     84
    8285struct osacquire {
    8386        ofstream & os;
Note: See TracChangeset for help on using the changeset viewer.