Lines Matching refs:impl
37 PFileImpl* impl = (PFileImpl*) self; in PFileCreateImpl() local
44 impl->lock = NULL; in PFileCreateImpl()
46 impl->littleEndian = isLittleEndian; in PFileCreateImpl()
48 impl->Interface.destroy = &PFileDestroyImpl; in PFileCreateImpl()
49 impl->Interface.getFilename = &PFileGetFilenameImpl; in PFileCreateImpl()
50 impl->Interface.vfprintf = &PFileVfprintfImpl; in PFileCreateImpl()
51 impl->filename = MALLOC(sizeof(LCHAR) * (LSTRLEN(filename) + 1), MTAG); in PFileCreateImpl()
53 if (impl->filename == NULL) in PFileCreateImpl()
59 LSTRCPY(impl->filename, filename); in PFileCreateImpl()
70 rc = PtrdMonitorCreate(&impl->lock); in PFileCreateImpl()
83 #define LOCK_MUTEX(rc, impl) \ argument
84 if (impl->lock != NULL) \
85 CHKLOG(rc, PtrdMonitorLock(impl->lock));
87 #define LOCK_MUTEX(rc, impl) argument
92 #define CLEANUP_AND_RETURN(rc, impl) \ argument
93 if (impl->lock!=NULL) \
94 CHKLOG(rc, PtrdMonitorUnlock(impl->lock)); \
97 if (impl->lock!=NULL) \
98 PtrdMonitorUnlock(impl->lock); \
101 #define CLEANUP_AND_RETURN(rc, impl) \ argument
110 PFileImpl* impl = (PFileImpl*) self; in PFileDestroyImpl() local
114 LOCK_MUTEX(rc, impl); in PFileDestroyImpl()
118 if (impl->filename) in PFileDestroyImpl()
120 FREE(impl->filename); in PFileDestroyImpl()
121 impl->filename = NULL; in PFileDestroyImpl()
124 if (impl->lock != NULL) in PFileDestroyImpl()
126 PtrdMonitorUnlock(impl->lock); in PFileDestroyImpl()
127 rc = PtrdMonitorDestroy(impl->lock); in PFileDestroyImpl()
135 if (impl->lock != NULL) in PFileDestroyImpl()
136 PtrdMonitorUnlock(impl->lock); in PFileDestroyImpl()
143 PFileImpl* impl = (PFileImpl*) self; in PFileGetFilenameImpl() local
151 LOCK_MUTEX(rc, impl); in PFileGetFilenameImpl()
152 if (LSTRLEN(impl->filename) + 1 > *len) in PFileGetFilenameImpl()
154 *len = LSTRLEN(impl->filename) + 1; in PFileGetFilenameImpl()
158 LSTRCPY(filename, impl->filename); in PFileGetFilenameImpl()
159 CLEANUP_AND_RETURN(rc, impl); in PFileGetFilenameImpl()