Changeset 4431
- Timestamp:
- 01/12/11 20:52:14 (13 years ago)
- Location:
- trunk/csctapi
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/csctapi/icc_async.c
r4425 r4431 57 57 #define PPS_HAS_PPS3(block) ((block[1] & 0x40) == 0x40) 58 58 59 //declare locking stuff for sc8in1 reader 60 static pthread_mutex_t sc8in1; //semaphore for SC8in1, FIXME should not be global, but one per SC8in1 61 62 #define LOCK_SC8IN1 \ 63 { \ 64 if (reader->typ == R_SC8in1) { \ 65 pthread_mutex_lock(&sc8in1); \ 66 cs_debug_mask(D_ATR, "SC8in1: locked for access of slot %i", reader->slot); \ 67 Sc8in1_Selectslot(reader, reader->slot); \ 68 } \ 69 } 70 71 #define UNLOCK_SC8IN1 \ 72 { \ 73 if (reader->typ == R_SC8in1) { \ 74 cs_debug_mask(D_ATR, "SC8in1: unlocked for access of slot %i", reader->slot); \ 75 pthread_mutex_unlock(&sc8in1); \ 76 } \ 77 } 59 78 60 79 /* -
trunk/csctapi/ifd_sc8in1.h
r4108 r4431 24 24 int Sc8in1_Selectslot(struct s_reader * reader, int slot); 25 25 26 static pthread_mutex_t sc8in1; //semaphore for SC8in1, FIXME should not be global, but one per SC8in127 28 #define LOCK_SC8IN1 \29 { \30 if (reader->typ == R_SC8in1) { \31 pthread_mutex_lock(&sc8in1); \32 cs_debug_mask(D_ATR, "SC8in1: locked for access of slot %i", reader->slot); \33 Sc8in1_Selectslot(reader, reader->slot); \34 } \35 }36 37 #define UNLOCK_SC8IN1 \38 { \39 if (reader->typ == R_SC8in1) { \40 cs_debug_mask(D_ATR, "SC8in1: unlocked for access of slot %i", reader->slot); \41 pthread_mutex_unlock(&sc8in1); \42 } \43 }
Note:
See TracChangeset
for help on using the changeset viewer.