- Timestamp:
- Nov 5, 2023 10:47:54 AM (16 months ago)
- svn:sync-xref-src-repo-rev:
- 159908
- Location:
- trunk/src/libs/xpcom18a4
- Files:
-
- 6 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/Makefile.kmk
r101809 r101812 559 559 endif 560 560 561 VBox-xpcom-nspr_SOURCES.darwin = nsprpub/pr/src/md/unix/darwin.c562 VBox-xpcom-nspr_SOURCES.freebsd = nsprpub/pr/src/md/unix/freebsd.c563 VBox-xpcom-nspr_SOURCES.linux = nsprpub/pr/src/md/unix/linux.c564 VBox-xpcom-nspr_SOURCES.solaris = nsprpub/pr/src/md/unix/solaris.c565 566 561 $(call KB_FN_DO_PASS0_ON_TARGET,VBox-xpcom-nspr) 567 562 -
trunk/src/libs/xpcom18a4/nsprpub/pr/src/md/unix/unix.c
r101805 r101812 59 59 #if defined(NTO) 60 60 #include <sys/statvfs.h> 61 #endif 62 63 #if defined(FREEBSD) 64 # include <signal.h> 61 65 #endif 62 66 … … 1118 1122 } 1119 1123 #endif /* _PR_NEED_FAKE_POLL */ 1124 1125 void _MD_EarlyInit(void) 1126 { 1127 #if defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD) 1128 /* 1129 * Ignore FPE because coercion of a NaN to an int causes SIGFPE 1130 * to be raised. 1131 */ 1132 struct sigaction act; 1133 1134 act.sa_handler = SIG_IGN; 1135 sigemptyset(&act.sa_mask); 1136 act.sa_flags = SA_RESTART; 1137 sigaction(SIGFPE, &act, 0); 1138 #endif 1139 } 1140 1141 #if defined(LINUX) 1142 extern void _MD_unix_terminate_waitpid_daemon(void); 1143 1144 void _MD_CleanupBeforeExit(void) 1145 { 1146 _MD_unix_terminate_waitpid_daemon(); 1147 } 1148 #endif 1149 1150 #if defined(SOLARIS) 1151 PRIntervalTime _MD_Solaris_TicksPerSecond(void) 1152 { 1153 /* 1154 * Ticks have a 10-microsecond resolution. So there are 1155 * 100000 ticks per second. 1156 */ 1157 return 100000UL; 1158 } 1159 1160 /* Interval timers, implemented using gethrtime() */ 1161 1162 PRIntervalTime _MD_Solaris_GetInterval(void) 1163 { 1164 union { 1165 hrtime_t hrt; /* hrtime_t is a 64-bit (long long) integer */ 1166 PRInt64 pr64; 1167 } time; 1168 PRInt64 resolution; 1169 PRIntervalTime ticks; 1170 1171 time.hrt = gethrtime(); /* in nanoseconds */ 1172 /* 1173 * Convert from nanoseconds to ticks. A tick's resolution is 1174 * 10 microseconds, or 10000 nanoseconds. 1175 */ 1176 LL_I2L(resolution, 10000); 1177 LL_DIV(time.pr64, time.pr64, resolution); 1178 LL_L2UI(ticks, time.pr64); 1179 return ticks; 1180 } 1181 #endif 1182
Note:
See TracChangeset
for help on using the changeset viewer.