Changeset 101964 in vbox for trunk/src/libs/xpcom18a4/nsprpub
- Timestamp:
- Nov 8, 2023 12:18:16 PM (15 months ago)
- Location:
- trunk/src/libs/xpcom18a4/nsprpub/pr
- Files:
-
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/nsprpub/pr/include/private/primpl.h
r101963 r101964 222 222 #define _PR_MD_GETOPENFILEINFO64 _MD_GETOPENFILEINFO64 223 223 224 225 /*****************************************************************************/226 /************************** File descriptor caching **************************/227 /*****************************************************************************/228 extern void _PR_InitFdCache(void);229 extern void _PR_CleanupFdCache(void);230 extern PRFileDesc *_PR_Getfd(void);231 extern void _PR_Putfd(PRFileDesc *fd);232 224 233 225 /* -
trunk/src/libs/xpcom18a4/nsprpub/pr/src/pthreads/ptio.c
r101935 r101964 270 270 271 271 #endif /* DEBUG */ 272 273 /* 274 ** Allocate a file descriptor from the heap. 275 */ 276 static PRFileDesc *_PR_Getfd(void) 277 { 278 PRFileDesc *fd = PR_NEW(PRFileDesc); 279 if (NULL != fd) 280 { 281 fd->secret = PR_NEW(PRFilePrivate); 282 if (NULL == fd->secret) PR_DELETE(fd); 283 } 284 if (fd == NULL) 285 return NULL; 286 287 fd->dtor = NULL; 288 fd->lower = fd->higher = NULL; 289 fd->identity = PR_NSPR_IO_LAYER; 290 memset(fd->secret, 0, sizeof(PRFilePrivate)); 291 return fd; 292 } /* _PR_Getfd */ 293 294 static void _PR_Putfd(PRFileDesc *fd) 295 { 296 PR_Free(fd->secret); 297 PR_Free(fd); 298 } /* _PR_Putfd */ 272 299 273 300 static void pt_poll_now(pt_Continuation *op) … … 622 649 PR_ASSERT(NULL != _pr_rename_lock); 623 650 624 _PR_InitFdCache(); /* do that */625 626 651 _pr_stdin = pt_SetMethods(0, PR_DESC_FILE, PR_FALSE, PR_TRUE); 627 652 _pr_stdout = pt_SetMethods(1, PR_DESC_FILE, PR_FALSE, PR_TRUE); … … 659 684 _PR_Putfd(_pr_stderr); 660 685 _pr_stderr = NULL; 661 662 _PR_CleanupFdCache();663 686 664 687 if (_pr_rename_lock)
Note:
See TracChangeset
for help on using the changeset viewer.