Changeset 1457
- Timestamp:
- Sep 5, 2004, 12:56:05 PM (21 years ago)
- Location:
- trunk/src/emx
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/include/InnoTekLIBC/logstrict.h
-
Property cvs2svn:cvs-rev
changed from
1.5
to1.6
r1456 r1457 51 51 * the default logging device. 52 52 */ 53 #ifdef DEBUG_LOGGING54 53 #ifndef __LIBC_LOG_INSTANCE 55 54 #define __LIBC_LOG_INSTANCE NULL 56 55 #endif 57 #endif 56 58 57 59 58 /** … … 61 60 * number before including this file. 62 61 */ 63 #ifdef DEBUG_LOGGING64 62 #ifndef __LIBC_LOG_GROUP 65 63 #define __LIBC_LOG_GROUP 0 66 64 #error "__LIBC_LOG_GROUP must be defined before including InnoTekLIBC/log.h" 67 65 #endif 68 #endif 66 67 68 /** Macro to, in release mode too, log a generic message within a function. */ 69 #define LIBCLOG_REL(...) \ 70 __libc_LogMsg(~0, __LIBC_LOG_INSTANCE, __LIBC_LOG_GROUP, __PRETTY_FUNCTION__, __VA_ARGS__) 71 69 72 70 73 /** Macro to log a function entry. */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/InnoTekLIBC/sharedpm.h
-
Property cvs2svn:cvs-rev
changed from
1.2
to1.3
r1456 r1457 206 206 * Every process is in one or another list depending on their state. */ 207 207 struct __libc_SPMProcess *pNext; 208 /** Pointer to the previous process in the list. */ 209 struct __libc_SPMProcess *pPrev; 210 208 211 /** Version of the SPM which created this process. */ 209 212 unsigned uVersion; … … 232 235 233 236 /** Reserved pool pointer field with default value 0. */ 234 unsigned aReserved[40 - 1 2];237 unsigned aReserved[40 - 13]; 235 238 236 239 /** Number of possible pointers to shared memory starting at pvInherit. … … 239 242 unsigned cPoolPointers; 240 243 /** Pointer to data inherited from the parent process. */ 241 __LIBC_PSPMINHERIT 244 __LIBC_PSPMINHERIT volatile pInherit; 242 245 } __LIBC_SPMPROCESS, *__LIBC_PSPMPROCESS; 243 246 … … 313 316 /** Array index by process state giving the head pointers 314 317 * to the processes in that state. */ 315 __LIBC_PSPMPROCESS 318 __LIBC_PSPMPROCESS volatile apHeads[__LIBC_PROCSTATE_MAX]; 316 319 317 320 /** Pointer to the tcpip globals. */ … … 320 323 pid_t pidCreate; 321 324 /** Creation timestamp. */ 322 union325 __extension__ union 323 326 { 324 327 #ifdef INCL_DOSDATETIME … … 334 337 335 338 /** 339 * SPM Exception handler registration record. 340 */ 341 typedef struct __LIBC_SPMXCPTREGREC 342 { 343 __extension__ union 344 { 345 #ifdef INCL_DOSEXCEPTIONS 346 EXCEPTIONREGISTRATIONRECORD Core; 347 #endif 348 void *apv[2]; 349 }; 350 unsigned uFutureStuff0; 351 unsigned uFutureStuff1; 352 } __LIBC_SPMXCPTREGREC; 353 /** Pointer to SPM exception handler registration record. */ 354 typedef __LIBC_SPMXCPTREGREC *__LIBC_PSPMXCPTREGREC; 355 356 357 358 359 /** 336 360 * Gets the current process. 337 361 * … … 402 426 * @returns 0 on success. 403 427 * @returns -1 and errno on failure. 404 * @remark Don't think of calling this if you're not LIBC! 405 */ 406 int __libc_spmLock(void); 428 * @param pRegRec Pointer to the exception handler registration record. 429 * @remark Don't even think of calling this if you're not LIBC! 430 */ 431 int __libc_spmLock(__LIBC_PSPMXCPTREGREC pRegRec); 407 432 408 433 /** … … 410 435 * 411 436 * @returns 0 on success. 412 * @returns 1 on failure. 413 * @remark Don't think of calling this if you're not LIBC! 414 */ 415 int __libc_spmUnlock(void); 437 * @returns -1 on and errno failure. 438 * @param pRegRec Pointer to the exception handler registration record. 439 * @remark Don't even think of calling this if you're not LIBC! 440 */ 441 int __libc_spmUnlock(__LIBC_PSPMXCPTREGREC pRegRec); 416 442 417 443 /** -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/io/_input.c
-
Property cvs2svn:cvs-rev
changed from
1.5
to1.6
r1456 r1457 226 226 } 227 227 format = *pfmt; 228 memset (map, 0, 256);228 bzero (map, 256); 229 229 end = 0; 230 230 ++format; … … 493 493 return; 494 494 } 495 495 496 496 if (c == 'e' || c == 'E') 497 497 { … … 525 525 { 526 526 case 'L': 527 lx = strtold (p, &q); 527 lx = strtold (p, &q); 528 528 break; 529 529 case 'l': -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/io/_newstre.c
-
Property cvs2svn:cvs-rev
changed from
1.6
to1.7
r1456 r1457 39 39 * before returning the handle to the caller. 40 40 */ 41 memset(&pSV->aFiles[i], 0, offsetof(FILE, __pSV));41 bzero(&pSV->aFiles[i], offsetof(FILE, __pSV)); 42 42 return &pSV->aFiles[i]; 43 43 } -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/io/chsize.c
-
Property cvs2svn:cvs-rev
changed from
1.5
to1.6
r1456 r1457 31 31 int j; 32 32 char zeros[4096]; 33 memset (zeros, 0, sizeof (zeros));33 bzero (zeros, sizeof (zeros)); 34 34 if (__lseek (handle, n, SEEK_SET) == -1) 35 35 return -1; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/libc.def
-
Property cvs2svn:cvs-rev
changed from
1.59
to1.60
r1456 r1457 25 25 "___libc_GLocaleCtype" @3 26 26 "___libc_GLocaleCtypeDefault" @4 27 ;fixme "___locale_collate" @4 28 ;fixme "___locale_ctype" @5 29 ;fixme "___locale_lconv" @6 30 ;fixme "___locale_time" @7 31 "___progname" @8 32 "___stderrp" @9 33 "___stdinp" @10 34 "___stdoutp" @11 35 "__atexit_n" @12 36 "__atexit_v" @13 37 "__emx_optarg" @14 38 "__emx_opterr" @15 39 "__emx_optind" @16 40 "__emx_optmode" @17 41 "__emx_optopt" @18 42 "__emx_optswchar" @19 43 "__fmode_bin" @20 44 "__mb_cur_max" @21 45 "__org_environ" @22 46 "__osmajor" @23 47 "__osminor" @24 48 "__pipe_size" @25 49 "__rand48_add" @26 50 "__rand48_mult" @27 51 "__rand48_seed" @28 52 "__std_daylight" @29 53 "__std_environ" @30 54 "__std_timezone" @31 55 "__std_tzname" @32 56 "__streamv_fmutex" @33 57 "__streamvec_head" @34 58 "__tmpidx" @35 59 "__tzi" @36 60 "__tzset_flag" @37 61 "__um_high_heap" @38 62 "__um_low_heap" @39 63 "__um_regular_heap" @40 64 "__um_tiled_heap" @41 65 "_error_message_count" @42 66 "_error_one_per_line" @43 67 "_error_print_progname" @44 68 "_optarg" @45 69 "_opterr" @46 70 "_optind" @47 71 "_optopt" @48 72 "_optreset" @49 73 "__streamvec_tail" @50 27 "___progname" @5 28 "___stderrp" @6 29 "___stdinp" @7 30 "___stdoutp" @8 31 "__atexit_n" @9 32 "__atexit_v" @10 33 "__emx_optarg" @11 34 "__emx_opterr" @12 35 "__emx_optind" @13 36 "__emx_optmode" @14 37 "__emx_optopt" @15 38 "__emx_optswchar" @16 39 "__fmode_bin" @17 40 "__mb_cur_max" @18 41 "__org_environ" @19 42 "__osmajor" @20 43 "__osminor" @21 44 "__pipe_size" @22 45 "__rand48_add" @23 46 "__rand48_mult" @24 47 "__rand48_seed" @25 48 "__std_daylight" @26 49 "__std_environ" @27 50 "__std_timezone" @28 51 "__std_tzname" @29 52 "__streamv_fmutex" @30 53 "__streamvec_head" @31 54 "__streamvec_tail" @32 55 "__tmpidx" @33 56 "__tzi" @34 57 "__tzset_flag" @35 58 "__um_high_heap" @36 59 "__um_low_heap" @37 60 "__um_regular_heap" @38 61 "__um_tiled_heap" @39 62 "_error_message_count" @40 63 "_error_one_per_line" @41 64 "_error_print_progname" @42 65 "_optarg" @43 66 "_opterr" @44 67 "_optind" @45 68 "_optopt" @46 69 "_optreset" @47 74 70 75 71 … … 138 134 "___umoddi3" @160 139 135 "__alloca" @161 136 ; GCC333 137 "___gcc_personality_v0" @162 ; (this is a bug in the gcc 3.2.2 config, it should've been there too.) 138 "__Unwind_Backtrace" @163 139 "__Unwind_FindEnclosingFunction" @164 140 "__Unwind_GetCFA" @165 141 "__Unwind_Resume_or_Rethrow" @166 140 142 ; LIBGCCEND 141 143 142 144 ; LIBC code - and const 143 "__CRT_init" @162 144 "__CRT_term" @163 145 "__HUGE_VAL" @164 146 "__LHUGE_VAL" @165 147 "___add_ovflpage" @166 148 "___addel" @167 149 "___argz_add" @168 150 "___argz_add_sep" @169 151 "___argz_append" @170 152 "___argz_count" @171 153 "___argz_create" @172 154 "___argz_create_sep" @173 155 "___argz_extract" @174 156 "___argz_insert" @175 157 "___argz_next" @176 158 "___argz_replace" @177 159 "___argz_stringify" @178 160 "___atod" @179 161 "___big_delete" @180 162 "___big_insert" @181 163 "___big_keydata" @182 164 "___big_return" @183 165 "___big_split" @184 166 "___bt_close" @185 167 "___bt_cmp" @186 168 "___bt_defcmp" @187 169 "___bt_defpfx" @188 170 "___bt_delete" @189 171 "___bt_dleaf" @190 172 "___bt_dmpage" @191 173 "___bt_dnpage" @192 174 "___bt_dpage" @193 175 "___bt_dump" @194 176 "___bt_fd" @195 177 "___bt_free" @196 178 "___bt_get" @197 179 "___bt_new" @198 180 "___bt_open" @199 181 "___bt_pgin" @200 182 "___bt_pgout" @201 183 "___bt_put" @202 184 "___bt_ret" @203 185 "___bt_search" @204 186 "___bt_seq" @205 187 "___bt_setcur" @206 188 "___bt_split" @207 189 "___bt_sync" @208 190 "___buf_free" @209 191 "___buf_init" @210 192 "___call_hash" @211 193 "___chdir" @212 194 "___chmod" @213 195 "___chsize" @214 196 "___close" @215 197 "___collate_range_cmp" @216 198 ;fixme "___convert_codepage" @217 199 "___ctordtorInit1" @218 200 "___ctordtorTerm1" @219 201 "___dbpanic" @220 202 "___delpair" @221 203 ;fixme "___do_Unicode" @222 204 "___dtoa" @223 205 "___dup" @224 206 "___dup2" @225 207 "___error" @226 208 "___error_at_line" @227 209 "___exit" @228 210 "___expand_table" @229 211 "___fcntl" @230 212 "___find_bigpair" @231 213 "___find_last_page" @232 214 "___findfirst" @233 215 "___findnext" @234 216 "___fmutex_release_internal" @235 217 "___fmutex_request_internal" @236 218 "___fork" @237 219 "___fpclassify" @238 220 "___fpclassifyf" @239 221 "___fpclassifyl" @240 222 "___free_ovflpage" @241 223 ;fixme "___from_ucs" @242 224 "___fstat" @243 225 "___ftime" @244 226 "___ftruncate" @245 227 "___get_buf" @246 228 "___get_page" @247 229 "___getcwd" @248 230 "___gnu_basename" @249 231 "___hash_open" @250 232 "___ibitmap" @251 233 "___imphandle" @252 234 "___init" @253 235 "___init_app" @254 236 "___init_dll" @255 237 "___ioctl1" @256 238 "___ioctl2" @257 239 "___isfinite" @258 240 "___isfinitef" @259 241 "___isfinitel" @260 242 "___isnan" @261 243 "___isnanf" @262 244 "___isnanl" @263 245 "___isnormal" @264 246 "___isnormalf" @265 247 "___isnormall" @266 248 "___istype" @267 249 "___libc_Back_threadCleanup" @268 250 "___libc_Back_threadEnd" @269 251 "___libc_Back_threadInit" @270 252 "___libc_Back_threadStartup" @271 253 "___libc_FH" @272 254 "___libc_FHAllocate" @273 255 "___libc_FHClose" @274 256 "___libc_FHEnsureHandles" @275 257 "___libc_HasHighMem" @276 258 "___libc_HeapEndVoting" @277 259 "___libc_HeapGetResult" @278 260 "___libc_HeapVote" @279 261 "___libc_HimemDefaultAlloc" @280 262 "___libc_HimemDefaultRelease" @281 263 "___libc_LogAssert" @282 264 "___libc_LogEnter" @283 265 "___libc_LogGroupInit" @284 266 "___libc_LogInit" @285 267 "___libc_LogLeave" @286 268 "___libc_LogMsg" @287 269 "___libc_LogRaw" @288 270 "___libc_StrictMemoryR" @289 271 "___libc_StrictMemoryRW" @290 272 "___libc_StrictStringR" @291 273 "___libc_TLSAlloc" @292 274 "___libc_TLSFree" @293 275 "___libc_TLSGet" @294 276 "___libc_TLSSet" @295 277 ;fixme "___locale_C" @296 278 "___log2" @297 279 "___lseek" @298 280 "___mempcpy" @299 281 "___mkdir" @300 282 "___open" @301 283 "___ovfl_delete" @302 284 "___ovfl_get" @303 285 "___ovfl_put" @304 286 "___pipe" @305 287 "___posix_spawn_file_actions_realloc" @306 288 "___put_page" @307 289 "___read" @308 290 "___read_kbd" @309 291 "___rec_close" @310 292 "___rec_delete" @311 293 "___rec_dleaf" @312 294 "___rec_fd" @313 295 "___rec_fmap" @314 296 "___rec_fpipe" @315 297 "___rec_get" @316 298 "___rec_iput" @317 299 "___rec_open" @318 300 "___rec_put" @319 301 "___rec_ret" @320 302 "___rec_search" @321 303 "___rec_seq" @322 304 "___rec_sync" @323 305 "___rec_vmap" @324 306 "___rec_vpipe" @325 307 "___reclaim_buf" @326 308 "___remove_zeros" @327 309 "___rmdir" @328 310 "___select" @329 311 "___settime" @330 312 "___signbit" @331 313 "___signbitf" @332 314 "___signbitl" @333 315 "___small_atod" @334 316 "___small_dtoa" @335 317 "___smutex_request_internal" @336 318 "___spawni" @337 319 "___spawnve" @338 320 "___split_page" @339 321 "___stat" @340 322 "___strndup" @341 323 "___strnlen" @342 324 "___swchar" @343 325 "___threadid" @344 326 ;fixme "___to_ucs" @345 327 "___tolower" @346 328 "___toupper" @347 329 "___ttyname" @348 330 "___ulimit" @349 331 "___unwind2" @350 332 "___utimes" @351 333 "___wait" @352 334 "___waitpid" @353 335 "___write" @354 336 "__abspath" @355 337 "__assert" @356 338 "__beginthread" @357 339 "__bi_add_bb" @358 340 "__bi_cmp_bb" @359 341 "__bi_cmp_pow2" @360 342 "__bi_div_add_back" @361 343 "__bi_div_estimate" @362 344 "__bi_div_rem_bb" @363 345 "__bi_div_rem_bw" @364 346 "__bi_div_rem_pow2" @365 347 "__bi_div_subtract" @366 348 "__bi_fls" @367 349 "__bi_hdiv_rem_b" @368 350 "__bi_mul_bb" @369 351 "__bi_mul_bw" @370 352 "__bi_pow5" @371 353 "__bi_set_b" @372 354 "__bi_set_d" @373 355 "__bi_set_w" @374 356 "__bi_shl_b" @375 357 "__bi_shl_w" @376 358 "__bi_shr_b" @377 359 "__bi_sub_mul_bw" @378 360 "__bi_wdiv_rem_pow2" @379 361 "__chdir2" @380 362 "__clear87" @381 363 "__closestream" @382 364 "__compute_dst_table" @383 365 "__const_HALF" @384 366 "__const_M_ONE" @385 367 "__const_NAN" @386 368 "__const_ONE" @387 369 "__const_TWO" @388 370 "__const_ZERO" @389 371 "__control87" @390 372 "__core" @391 373 "__crlf" @392 374 "__day" @393 375 "__defext" @394 376 "__dorand48" @395 377 "__dt_free" @396 378 "__dt_read" @397 379 "__dt_sort" @398 380 "__dt_split" @399 381 "__ea_free" @400 382 "__ea_get" @401 383 "__ea_put" @402 384 "__ea_remove" @403 385 "__ea_set_errno" @404 386 "__ea_write" @405 387 "__ead_add" @406 388 "__ead_clear" @407 389 "__ead_copy" @408 390 "__ead_count" @409 391 "__ead_create" @410 392 "__ead_delete" @411 393 "__ead_destroy" @412 394 "__ead_enum" @413 395 "__ead_fea2list_size" @414 396 "__ead_fea2list_to_fealist" @415 397 "__ead_fealist_to_fea2list" @416 398 "__ead_find" @417 399 "__ead_get_fea2list" @418 400 "__ead_get_flags" @419 401 "__ead_get_name" @420 402 "__ead_get_value" @421 403 "__ead_make_index" @422 404 "__ead_name_len" @423 405 "__ead_read" @424 406 "__ead_replace" @425 407 "__ead_size_buffer" @426 408 "__ead_sort" @427 409 "__ead_use_fea2list" @428 410 "__ead_value_size" @429 411 "__ead_write" @430 412 "__emx_getopt" @431 413 "__emxload_connect" @432 414 "__emxload_disconnect" @433 415 "__emxload_do_connect" @434 416 "__emxload_do_disconnect" @435 417 "__emxload_do_receive" @436 418 "__emxload_do_request" @437 419 "__emxload_do_wait" @438 420 "__emxload_env" @439 421 "__emxload_list_get" @440 422 "__emxload_list_start" @441 423 "__emxload_prog" @442 424 "__emxload_request" @443 425 "__emxload_stop" @444 426 "__emxload_this" @445 427 "__emxload_unload" @446 428 "__endbuf1" @447 429 "__endthread" @448 430 "__envargs" @449 431 "__err" @450 432 "__errno" @451 433 "__errno_fun" @452 434 "__execname" @453 435 "__exit" @454 436 "__exit_streams" @455 437 "___libc_FHMoreHandles" @456 438 "__fbuf" @457 439 "__fcloseall" @458 440 "__fflush_nolock" @459 441 "__filesys" @460 442 "__fill" @461 443 "__flush" @462 444 "__flushstream" @463 445 "__fmutex_checked_close" @464 446 "__fmutex_checked_create" @465 447 "__fmutex_checked_open" @466 448 "__fmutex_close" @467 449 "__fmutex_create" @468 450 "__fmutex_dummy" @469 451 "__fmutex_open" @470 452 "__fnexplode" @471 453 "__fnexplodefree" @472 454 "__fngetdrive" @473 455 "__fnisabs" @474 456 "__fnisrel" @475 457 "__fnlwr" @476 458 "__fnlwr2" @477 459 "__fnslashify" @478 460 "__fpreset" @479 461 "__fseek_hdr" @480 462 "__fseek_nolock" @481 463 "__fsetmode" @482 464 "__fsopen" @483 465 "__ftell_nolock" @484 466 "__fullpath" @485 467 "__fwrite_nolock" @486 468 "__fxam" @487 469 "__fxaml" @488 470 "__getcwd1" @489 471 "__getcwd2" @490 472 "__getdrive" @491 473 "__getext" @492 474 "__getext2" @493 475 "__getname" @494 476 "__getpass1" @495 477 "__getpass2" @496 478 "__getprogname" @497 479 "__gettid" @498 480 "__getvol" @499 481 "__gmt2loc" @500 482 "__hcalloc" @501 483 "__heap_walk" @502 484 "__heapchk" @503 485 "__heapmin" @504 486 "__heapset" @505 487 "__hinitheap" @506 488 "__hmalloc" @507 489 "__hrealloc" @508 490 "__imphandle" @509 491 ; fixme!! "__init1_tmp" @510 492 "__init_streams" @511 493 "__input" @512 494 "__int86" @513 495 "__isterm" @514 496 "__lcalloc" @515 497 "__libc_16to32" @516 498 "__libc_32to16" @517 499 "__libc_thunk1" @518 500 "__linitheap" @519 501 "__lmalloc" @520 502 "__loc2gmt" @521 503 "__lrealloc" @522 504 "__makepath" @523 505 "__memcount" @524 506 "__memdif" @525 507 "__memrchr" @526 508 "__memswap" @527 509 "__mfclose" @528 510 "__mfopen" @529 511 "__mheap" @530 512 "__mktime" @531 513 "__month_day_leap" @532 514 "__month_day_non_leap" @533 515 "__msize" @534 516 "__newstream" @535 517 "__openstream" @536 518 "__os2_bad" @537 519 "__output" @538 520 "__path" @539 521 "__read_kbd" @540 522 "__remext" @541 523 "__response" @542 524 "__rfnlwr" @543 525 "__rmtmp" @544 526 ; fixme!! "__rmutex_checked_close" @545 527 ; fixme!! "__rmutex_checked_create" @546 528 ; fixme!! "__rmutex_checked_open" @547 529 ; fixme!! "__rmutex_close" @548 530 ; fixme!! "__rmutex_create" @549 531 ; fixme!! "__rmutex_dummy" @550 532 ; fixme!! "__rmutex_fork" @551 533 ; fixme!! "__rmutex_open" @552 534 "__scrsize" @553 535 "__searchenv" @554 536 "__seek_hdr" @555 537 "___libc_PathRewriteAdd" @556 538 "___libc_PathRewriteRemove" @557 539 "__sfnlwr" @558 540 "__sleep2" @559 541 "__splitargs" @560 542 "__splitpath" @561 543 "__status87" @562 544 "__std_abort" @563 545 "__std_abs" @564 546 "__std_access" @565 547 "__std_acos" @566 548 "__std_acosl" @567 549 "__std_asctime" @568 550 "__std_asctime_r" @569 551 "__std_asin" @570 552 "__std_asinl" @571 553 "__std_atan" @572 554 "__std_atan2" @573 555 "__std_atan2l" @574 556 "__std_atanl" @575 557 "__std_atexit" @576 558 "__std_atof" @577 559 "__std_atofl" @578 560 "__std_atoi" @579 561 "__std_atol" @580 562 "__std_atoll" @581 563 "__std_basename" @582 564 "__std_bcmp" @583 565 "__std_bcopy" @584 566 "__std_brk" @585 567 "__std_bsearch" @586 568 "__std_bzero" @587 569 "__std_calloc" @588 570 "__std_cbrt" @589 571 "__std_cbrtl" @590 572 "__std_ceil" @591 573 "__std_ceill" @592 574 "__std_cfgetispeed" @593 575 "__std_cfgetospeed" @594 576 "__std_cfsetispeed" @595 577 "__std_cfsetospeed" @596 578 "__std_cfsetspeed" @597 579 "__std_chdir" @598 580 "__std_chdrive" @599 581 "__std_chmod" @600 582 "__std_chsize" @601 583 "__std_clearerr" @602 584 "__std_clock" @603 585 "__std_close" @604 586 "__std_closedir" @605 587 "__std_copysign" @606 588 "__std_copysignf" @607 589 "__std_copysignl" @608 590 "__std_cos" @609 591 "__std_cosh" @610 592 "__std_coshl" @611 593 "__std_cosl" @612 594 "__std_creat" @613 595 "__std_ctime" @614 596 "__std_ctime_r" @615 597 "__std_cuserid" @616 598 "__std_difftime" @617 599 "__std_dirname" @618 600 "__std_div" @619 601 "__std_drand48" @620 602 "__std_dup" @621 603 "__std_dup2" @622 604 "__std_endpwent" @623 605 "__std_eof" @624 606 "__std_erand48" @625 607 "__std_execl" @626 608 "__std_execle" @627 609 "__std_execlp" @628 610 "__std_execlpe" @629 611 "__std_execv" @630 612 "__std_execve" @631 613 "__std_execvp" @632 614 "__std_execvpe" @633 615 "__std_exit" @634 616 "__std_exp" @635 617 "__std_expand" @636 618 "__std_expl" @637 619 "__std_fabs" @638 620 "__std_fabsl" @639 621 "__std_fclose" @640 622 "__std_fcntl" @641 623 "__std_fdopen" @642 624 "__std_feof" @643 625 "__std_ferror" @644 626 "__std_fflush" @645 627 "__std_ffs" @646 628 "__std_fgetc" @647 629 "__std_fgetchar" @648 630 "__std_fgetpos" @649 631 "__std_fgets" @650 632 "__std_filelength" @651 633 "__std_fileno" @652 634 "__std_flock" @653 635 "__std_floor" @654 636 "__std_floorl" @655 637 "__std_flushall" @656 638 "__std_fmod" @657 639 "__std_fmodl" @658 640 "__std_fnmatch" @659 641 "__std_fopen" @660 642 "__std_fork" @661 643 "__std_fpathconf" @662 644 "__std_fprintf" @663 645 "__std_fputc" @664 646 "__std_fputchar" @665 647 "__std_fputs" @666 648 "__std_fread" @667 649 "__std_free" @668 650 "__std_freopen" @669 651 "__std_frexp" @670 652 "__std_frexpl" @671 653 "__std_fscanf" @672 654 "__std_fseek" @673 655 "__std_fseeko" @674 656 "__std_fsetpos" @675 657 "__std_fstat" @676 658 "__std_fsync" @677 659 "__std_ftell" @678 660 "__std_ftello" @679 661 "__std_ftime" @680 662 "__std_ftruncate" @681 663 "__std_ftw" @682 664 "__std_fwrite" @683 665 "__std_gcvt" @684 666 "__std_getchar" @685 667 "__std_getcwd" @686 668 "__std_getegid" @687 669 "__std_getenv" @688 670 "__std_geteuid" @689 671 "__std_getgid" @690 672 "__std_getgrgid" @691 673 "__std_getgrnam" @692 674 "__std_getgroups" @693 675 "__std_getlogin" @694 676 "__std_getopt" @695 677 "__std_getpagesize" @696 678 "__std_getpass" @697 679 "__std_getpgrp" @698 680 "__std_getpid" @699 681 "__std_getppid" @700 682 "__std_getpw" @701 683 "__std_getpwent" @702 684 "__std_getpwnam" @703 685 "__std_getpwuid" @704 686 "__std_gets" @705 687 "__std_gettimeofday" @706 688 "__std_getuid" @707 689 "__std_getw" @708 690 "__std_getwd" @709 691 "__std_glob" @710 692 "__std_globfree" @711 693 "__std_gmtime" @712 694 "__std_gmtime_r" @713 695 "__std_hcreate" @714 696 "__std_hdestroy" @715 697 "__std_hsearch" @716 698 "__std_hypot" @717 699 "__std_hypotl" @718 700 "__std_imaxabs" @719 701 "__std_imaxdiv" @720 702 "__std_index" @721 703 "__std_insque" @722 704 "__std_ioctl" @723 705 "__std_isatty" @724 706 "__std_jrand48" @725 707 "__std_kill" @726 708 "__std_labs" @727 709 "__std_lcong48" @728 710 "__std_ldexp" @729 711 "__std_ldexpl" @730 712 "__std_ldiv" @731 713 "__std_lfind" @732 714 "__std_lltoa" @733 715 "__std_localeconv" @734 716 "__std_localtime" @735 717 "__std_localtime_r" @736 718 "__std_lockf" @737 719 "__std_log" @738 720 "__std_log10" @739 721 "__std_log10l" @740 722 "__std_logl" @741 723 "__std_longjmp" @742 724 "__std_lrand48" @743 725 "__std_lsearch" @744 726 "__std_lseek" @745 727 "__std_lstat" @746 728 "__std_ltoa" @747 729 "__std_malloc" @748 730 "__std_mblen" @749 731 "__std_mbstowcs" @750 732 "__std_mbtowc" @751 733 "__std_memccpy" @752 734 "__std_memchr" @753 735 "__std_memcmp" @754 736 "__std_memcpy" @755 737 "__std_memicmp" @756 738 "__std_memmove" @757 739 "__std_memset" @758 740 "__std_mkdir" @759 741 "__std_mkstemp" @760 742 "__std_mktemp" @761 743 "__std_mktime" @762 744 "__std_modf" @763 745 "__std_modfl" @764 746 "__std_mrand48" @765 747 "__std_nextafter" @766 748 "__std_nextafterf" @767 749 "__std_nextafterl" @768 750 "__std_nrand48" @769 751 "__std_open" @770 752 "__std_opendir" @771 753 "__std_pathconf" @772 754 "__std_pause" @773 755 "__std_pclose" @774 756 "__std_perror" @775 757 "__std_pipe" @776 758 "__std_popen" @777 759 "__std_posix_memalign" @778 760 "__std_pow" @779 761 "__std_powl" @780 762 "__std_printf" @781 763 "__std_putchar" @782 764 "__std_putenv" @783 765 "__std_puts" @784 766 "__std_putw" @785 767 "__std_qsort" @786 768 "__std_qsort_r" @787 769 "__std_raise" @788 770 "__std_rand" @789 771 "__std_read" @790 772 "__std_readdir" @791 773 "__std_readdir_r" @792 774 "__std_readv" @793 775 "__std_realloc" @794 776 "__std_realpath" @795 777 "__std_remove" @796 778 "__std_remque" @797 779 "__std_rename" @798 780 "__std_rewind" @799 781 "__std_rewinddir" @800 782 "__std_rindex" @801 783 "__std_rint" @802 784 "__std_rintl" @803 785 "__std_rmdir" @804 786 "__std_sbrk" @805 787 "__std_scanf" @806 788 "__std_seed48" @807 789 "__std_seekdir" @808 790 "__std_select" @809 791 "__std_setbuf" @810 792 "__std_setbuffer" @811 793 "__std_setenv" @812 794 "__std_setgid" @813 795 "__std_setjmp" @814 796 "__std_setlocale" @815 797 "__std_setmode" @816 798 "__std_setpgid" @817 799 "__std_setpwent" @818 800 "__std_setsid" @819 801 "__std_settimeofday" @820 802 "__std_setuid" @821 803 "__std_setvbuf" @822 804 "__std_sigaction" @823 805 "__std_sigaddset" @824 806 "__std_sigdelset" @825 807 "__std_sigemptyset" @826 808 "__std_sigfillset" @827 809 "__std_sigismember" @828 810 "__std_siglongjmp" @829 811 "__std_signal" @830 812 "__std_sigpending" @831 813 "__std_sigprocmask" @832 814 "__std_sigsetjmp" @833 815 "__std_sigsuspend" @834 816 "__std_sin" @835 817 "__std_sinh" @836 818 "__std_sinhl" @837 819 "__std_sinl" @838 820 "__std_sleep" @839 821 "__std_snprintf" @840 822 "__std_sopen" @841 823 "__std_spawnl" @842 824 "__std_spawnle" @843 825 "__std_spawnlp" @844 826 "__std_spawnlpe" @845 827 "__std_spawnv" @846 828 "__std_spawnve" @847 829 "__std_spawnvp" @848 830 "__std_spawnvpe" @849 831 "__std_sprintf" @850 832 "__std_sqrt" @851 833 "__std_sqrtl" @852 834 "__std_srand" @853 835 "__std_srand48" @854 836 "__std_sscanf" @855 837 "__std_stat" @856 838 "__std_strcat" @857 839 "__std_strchr" @858 840 "__std_strcmp" @859 841 "__std_strcoll" @860 842 "__std_strcpy" @861 843 "__std_strcspn" @862 844 "__std_strdup" @863 845 "__std_strerror" @864 846 "__std_strerror_r" @865 847 "__std_strftime" @866 848 "__std_stricmp" @867 849 "__std_strlen" @868 850 "__std_strlwr" @869 851 "__std_strncat" @870 852 "__std_strncmp" @871 853 "__std_strncpy" @872 854 "__std_strnicmp" @873 855 "__std_strnset" @874 856 "__std_strpbrk" @875 857 "__std_strptime" @876 858 "__std_strrchr" @877 859 "__std_strrev" @878 860 "__std_strset" @879 861 "__std_strspn" @880 862 "__std_strstr" @881 863 "__std_strtod" @882 864 "__std_strtof" @883 865 "__std_strtoimax" @884 866 "__std_strtok" @885 867 "__std_strtol" @886 868 "__std_strtold" @887 869 "__std_strtoll" @888 870 "__std_strtoul" @889 871 "__std_strtoull" @890 872 "__std_strtoumax" @891 873 "__std_strupr" @892 874 "__std_strxfrm" @893 875 "__std_swab" @894 876 "__std_sys_errlist" @895 877 "__std_sys_nerr" @896 878 "__std_sysconf" @897 879 "__std_system" @898 880 "__std_tan" @899 881 "__std_tanh" @900 882 "__std_tanhl" @901 883 "__std_tanl" @902 884 "__std_tcdrain" @903 885 "__std_tcflow" @904 886 "__std_tcflush" @905 887 "__std_tcgetattr" @906 888 "__std_tcgetpgrp" @907 889 "__std_tcsendbreak" @908 890 "__std_tcsetattr" @909 891 "__std_tcsetpgrp" @910 892 "__std_tdelete" @911 893 "__std_tell" @912 894 "__std_telldir" @913 895 "__std_tempnam" @914 896 "__std_tfind" @915 897 "__std_time" @916 898 "__std_times" @917 899 "__std_tmpfile" @918 900 "__std_tmpnam" @919 901 "__std_trunc" @920 902 "__std_truncate" @921 903 "__std_truncl" @922 904 "__std_tsearch" @923 905 "__std_ttyname" @924 906 "__std_twalk" @925 907 "__std_tzset" @926 908 "__std_ulimit" @927 909 "__std_ulltoa" @928 910 "__std_ultoa" @929 911 "__std_umask" @930 912 "__std_uname" @931 913 "__std_ungetc" @932 914 "__std_unlink" @933 915 "__std_unsetenv" @934 916 "__std_usleep" @935 917 "__std_utime" @936 918 "__std_utimes" @937 919 "__std_vfprintf" @938 920 "__std_vfscanf" @939 921 "__std_vprintf" @940 922 "__std_vscanf" @941 923 "__std_vsnprintf" @942 924 "__std_vsprintf" @943 925 "__std_vsscanf" @944 926 "__std_wait" @945 927 "__std_waitpid" @946 928 "__std_wcstombs" @947 929 "__std_wctomb" @948 930 "__std_write" @949 931 "__std_writev" @950 932 "__stream_read" @951 933 "__stream_write" @952 934 "__strncpy" @953 935 "__swchar" @954 936 "__sys_dump_heap_objs" @955 937 "__tcalloc" @956 938 "__tfree" @957 939 "__theapmin" @958 940 "__threadstore" @959 941 "__tmalloc" @960 942 "__tmpbuf1" @961 943 "__tmpidx_lock" @962 944 "__tmpidx_unlock" @963 945 "__tmpidxnam" @964 946 "__trealloc" @965 947 "__trslash" @966 948 "__uaddmem" @967 949 "__ucalloc" @968 950 "__uclose" @969 951 "__ucreate" @970 952 "__ucreate2" @971 953 "__udefault" @972 954 "__udestroy" @973 955 "__uflags" @974 956 "__uheap_type" @975 957 "__uheap_walk" @976 958 "__uheap_walk2" @977 959 "__uheapchk" @978 960 "__uheapmin" @979 961 "__uheapset" @980 962 "__uldiv" @981 963 "__um_addmem_nolock" @982 964 "__um_alloc_no_lock" @983 965 "__um_crumb_free_maybe_lock" @984 966 "__um_default_alloc" @985 967 "__um_default_expand" @986 968 "__um_default_release" @987 969 "__um_default_shrink" @988 970 "__um_find_bucket" @989 971 "__um_free_maybe_lock" @990 972 "__um_init_default_regular_heap" @991 973 "__um_init_default_tiled_heap" @992 974 "__um_lump_alloc" @993 975 "__um_lump_coalesce_free" @994 976 "__um_lump_free_maybe_lock" @995 977 "__um_lump_link_heap" @996 978 "__um_lump_make_free" @997 979 "__um_lump_unlink_bucket" @998 980 "__um_lump_unlink_heap" @999 981 "__um_realloc" @1000 982 "__um_seg_addmem" @1001 983 "__um_seg_setmem" @1002 984 "__um_walk_error" @1003 985 "__um_walk_no_lock" @1004 986 "__umalloc" @1005 987 "__ungetc_nolock" @1006 988 "__uopen" @1007 989 "__ustats" @1008 990 "__utcalloc" @1009 991 "__utdefault" @1010 992 "__utmalloc" @1011 993 "__vsopen" @1012 994 "__warn" @1013 995 "__wildcard" @1014 996 "__year_day" @1015 997 "_argz_delete" @1016 998 "_dbm_clearerr" @1017 999 "_dbm_close" @1018 1000 "_dbm_delete" @1019 1001 "_dbm_dirfno" @1020 1002 "_dbm_error" @1021 1003 "_dbm_fetch" @1022 1004 "_dbm_firstkey" @1023 1005 "_dbm_nextkey" @1024 1006 "_dbm_open" @1025 1007 "_dbm_store" @1026 1008 "_dbopen" @1027 1009 "_err_set_exit" @1028 1010 "_err_set_file" @1029 1011 "_errc" @1030 1012 "_errx" @1031 1013 "_getopt_long" @1032 1014 "_heapsort" @1033 1015 "_initstate" @1034 1016 "_isalnum" @1035 1017 "_isalpha" @1036 1018 "_isascii" @1037 1019 "_isblank" @1038 1020 "_iscntrl" @1039 1021 "_isdigit" @1040 1022 "_isgraph" @1041 1023 "_ishexnumber" @1042 1024 "_islower" @1043 1025 "_isnumber" @1044 1026 "_isprint" @1045 1027 "_ispunct" @1046 1028 "_isspace" @1047 1029 "_isupper" @1048 1030 "_isxdigit" @1049 1031 "_lchmod" @1050 1032 "_mergesort" @1051 1033 "_mpool_close" @1052 1034 "_mpool_filter" @1053 1035 "_mpool_get" @1054 1036 "_mpool_new" @1055 1037 "_mpool_open" @1056 1038 "_mpool_put" @1057 1039 "_mpool_sync" @1058 1040 "_posix_spawn" @1059 1041 "_posix_spawn_file_actions_addclose" @1060 1042 "_posix_spawn_file_actions_adddup2" @1061 1043 "_posix_spawn_file_actions_addopen" @1062 1044 "_posix_spawn_file_actions_destroy" @1063 1045 "_posix_spawn_file_actions_init" @1064 1046 "_posix_spawnattr_destroy" @1065 1047 "_posix_spawnattr_getflags" @1066 1048 "_posix_spawnattr_getpgroup" @1067 1049 "_posix_spawnattr_getschedparam" @1068 1050 "_posix_spawnattr_getschedpolicy" @1069 1051 "_posix_spawnattr_getsigdefault" @1070 1052 "_posix_spawnattr_getsigmask" @1071 1053 "_posix_spawnattr_init" @1072 1054 "_posix_spawnattr_setflags" @1073 1055 "_posix_spawnattr_setpgroup" @1074 1056 "_posix_spawnattr_setschedparam" @1075 1057 "_posix_spawnattr_setschedpolicy" @1076 1058 "_posix_spawnattr_setsigdefault" @1077 1059 "_posix_spawnattr_setsigmask" @1078 1060 "_posix_spawnp" @1079 1061 "_radixsort" @1080 1062 "_random" @1081 1063 "_reallocf" @1082 1064 "_regcomp" @1083 1065 "_regerror" @1084 1066 "_regexec" @1085 1067 "_regfree" @1086 1068 "_setprogname" @1087 1069 "_setstate" @1088 1070 "_sig_info" @1089 1071 "_sradixsort" @1090 1072 "_srandom" @1091 1073 "_srandomdev" @1092 1074 "_stpcpy" @1093 1075 "_strcasestr" @1094 1076 "_strlcat" @1095 1077 "_strlcpy" @1096 1078 "_strnstr" @1097 1079 "_strsep" @1098 1080 "_strsignal" @1099 1081 "_sys_exception" @1100 1082 "_sys_nsig" @1101 1083 "_sys_siglist" @1102 1084 "_sys_signame" @1103 1085 "_toascii" @1104 1086 "_tolower" @1105 1087 "_toupper" @1106 1088 "_verr" @1107 1089 "_verrc" @1108 1090 "_verrx" @1109 1091 "_vwarn" @1110 1092 "_vwarnc" @1111 1093 "_vwarnx" @1112 1094 "_warnc" @1113 1095 "_warnx" @1114 1096 "_catclose" @1115 1097 "_catgets" @1116 1098 "_catopen" @1117 1099 "___libc_PathRewrite" @1118 1100 "___libc_TLSDestructor" @1119 1101 "___libc_ThreadRegisterTermCallback" @1120 1102 "___libc_TLSGetDestructor" @1121 145 "__CRT_init" @167 146 "__CRT_term" @168 147 "__HUGE_VAL" @169 148 "__LHUGE_VAL" @170 149 "DosAllocMemEx" @171 150 "DosAllocSharedMemEx" @172 151 "DosCloseEventSemEx" @173 152 "DosCloseMutexSemEx" @174 153 "DosCreateEventSemEx" @175 154 "DosCreateMutexSemEx" @176 155 "DosFreeMemEx" @177 156 "DosGetNamedSharedMemEx" @178 157 "DosGetSharedMemEx" @179 158 "DosOpenEventSemEx" @180 159 "DosOpenMutexSemEx" @181 160 "___add_ovflpage" @182 161 "___addel" @183 162 "___argz_add" @184 163 "___argz_add_sep" @185 164 "___argz_append" @186 165 "___argz_count" @187 166 "___argz_create" @188 167 "___argz_create_sep" @189 168 "___argz_extract" @190 169 "___argz_insert" @191 170 "___argz_next" @192 171 "___argz_replace" @193 172 "___argz_stringify" @194 173 "___atod" @195 174 "___big_delete" @196 175 "___big_insert" @197 176 "___big_keydata" @198 177 "___big_return" @199 178 "___big_split" @200 179 "___bt_close" @201 180 "___bt_cmp" @202 181 "___bt_defcmp" @203 182 "___bt_defpfx" @204 183 "___bt_delete" @205 184 "___bt_dleaf" @206 185 "___bt_dmpage" @207 186 "___bt_dnpage" @208 187 "___bt_dpage" @209 188 "___bt_dump" @210 189 "___bt_fd" @211 190 "___bt_free" @212 191 "___bt_get" @213 192 "___bt_new" @214 193 "___bt_open" @215 194 "___bt_pgin" @216 195 "___bt_pgout" @217 196 "___bt_put" @218 197 "___bt_ret" @219 198 "___bt_search" @220 199 "___bt_seq" @221 200 "___bt_setcur" @222 201 "___bt_split" @223 202 "___bt_sync" @224 203 "___buf_free" @225 204 "___buf_init" @226 205 "___call_hash" @227 206 "___chdir" @228 207 "___chmod" @229 208 "___chsize" @230 209 "___close" @231 210 "___collate_range_cmp" @232 211 "___ctordtorInit1" @233 212 "___ctordtorTerm1" @234 213 "___dbpanic" @235 214 "___delpair" @236 215 "___dtoa" @237 216 "___dup" @238 217 "___dup2" @239 218 "___error" @240 219 "___error_at_line" @241 220 "___exit" @242 221 "___expand_table" @243 222 "___fcntl" @244 223 "___find_bigpair" @245 224 "___find_last_page" @246 225 "___findfirst" @247 226 "___findnext" @248 227 "___fmutex_release_internal" @249 228 "___fmutex_request_internal" @250 229 "___fork" @251 230 "___fpclassify" @252 231 "___fpclassifyf" @253 232 "___fpclassifyl" @254 233 "___free_ovflpage" @255 234 "___fstat" @256 235 "___ftime" @257 236 "___ftruncate" @258 237 "___get_buf" @259 238 "___get_page" @260 239 "___getcwd" @261 240 "___gnu_basename" @262 241 "___hash_open" @263 242 "___ibitmap" @264 243 "___imphandle" @265 244 "___init" @266 245 "___init_app" @267 246 "___init_dll" @268 247 "___ioctl1" @269 248 "___ioctl2" @270 249 "___isctype" @271 250 "___isfinite" @272 251 "___isfinitef" @273 252 "___isfinitel" @274 253 "___isnan" @275 254 "___isnanf" @276 255 "___isnanl" @277 256 "___isnormal" @278 257 "___isnormalf" @279 258 "___isnormall" @280 259 "___istype" @281 260 "___libc_Back_threadCleanup" @282 261 "___libc_Back_threadEnd" @283 262 "___libc_Back_threadInit" @284 263 "___libc_Back_threadStartup" @285 264 "___libc_FH" @286 265 "___libc_FHAllocate" @287 266 "___libc_FHClose" @288 267 "___libc_FHEnsureHandles" @289 268 "___libc_FHMoreHandles" @290 269 "___libc_ForkDefaultModuleCallback" @291 270 "___libc_ForkRegisterModule" @292 271 "___libc_HasHighMem" @293 272 "___libc_HeapEndVoting" @294 273 "___libc_HeapGetResult" @295 274 "___libc_HeapVote" @296 275 "___libc_HimemDefaultAlloc" @297 276 "___libc_HimemDefaultRelease" @298 277 "___libc_LogAssert" @299 278 "___libc_LogDumpHex" @300 279 "___libc_LogEnter" @301 280 "___libc_LogGroupInit" @302 281 "___libc_LogInit" @303 282 "___libc_LogLeave" @304 283 "___libc_LogMsg" @305 284 "___libc_LogRaw" @306 285 "___libc_PathRewrite" @307 286 "___libc_PathRewriteAdd" @308 287 "___libc_PathRewriteRemove" @309 288 "___libc_StrictMemoryR" @310 289 "___libc_StrictMemoryRW" @311 290 "___libc_StrictStringR" @312 291 "___libc_TLSAlloc" @313 292 "___libc_TLSDestructor" @314 293 "___libc_TLSFree" @315 294 "___libc_TLSGet" @316 295 "___libc_TLSGetDestructor" @317 296 "___libc_TLSSet" @318 297 "___libc_TcpipAllocFH43" @319 298 "___libc_TcpipAllocFH44" @320 299 "___libc_TcpipAllocFHEx43" @321 300 "___libc_TcpipAllocFHEx44" @322 301 "___libc_Tcpipbsdselect43" @323 302 "___libc_Tcpipbsdselect44" @324 303 "___libc_ThreadRegisterTermCallback" @325 304 "___libc_TranslateCodepage" @326 305 "___log2" @327 306 "___lseek" @328 307 "___mempcpy" @329 308 "___mkdir" @330 309 "___open" @331 310 "___ovfl_delete" @332 311 "___ovfl_get" @333 312 "___ovfl_put" @334 313 "___pipe" @335 314 "___posix_spawn_file_actions_realloc" @336 315 "___put_page" @337 316 "___read" @338 317 "___read_kbd" @339 318 "___rec_close" @340 319 "___rec_delete" @341 320 "___rec_dleaf" @342 321 "___rec_fd" @343 322 "___rec_fmap" @344 323 "___rec_fpipe" @345 324 "___rec_get" @346 325 "___rec_iput" @347 326 "___rec_open" @348 327 "___rec_put" @349 328 "___rec_ret" @350 329 "___rec_search" @351 330 "___rec_seq" @352 331 "___rec_sync" @353 332 "___rec_vmap" @354 333 "___rec_vpipe" @355 334 "___reclaim_buf" @356 335 "___remove_zeros" @357 336 "___rmdir" @358 337 "___select" @359 338 "___settime" @360 339 "___signbit" @361 340 "___signbitf" @362 341 "___signbitl" @363 342 "___small_atod" @364 343 "___small_dtoa" @365 344 "___smutex_request_internal" @366 345 "___spawni" @367 346 "___spawnve" @368 347 "___split_page" @369 348 "___stat" @370 349 "___strndup" @371 350 "___strnlen" @372 351 "___swchar" @373 352 "___threadid" @374 353 "___tolower" @375 354 "___toupper" @376 355 "___ttyname" @377 356 "___ulimit" @378 357 "___unwind2" @379 358 "___utimes" @380 359 "___wait" @381 360 "___waitpid" @382 361 "___write" @383 362 "__abspath" @384 363 "__assert" @385 364 "__atfork_callback" @386 365 "__beginthread" @387 366 "__bi_add_bb" @388 367 "__bi_cmp_bb" @389 368 "__bi_cmp_pow2" @390 369 "__bi_div_add_back" @391 370 "__bi_div_estimate" @392 371 "__bi_div_rem_bb" @393 372 "__bi_div_rem_bw" @394 373 "__bi_div_rem_pow2" @395 374 "__bi_div_subtract" @396 375 "__bi_fls" @397 376 "__bi_hdiv_rem_b" @398 377 "__bi_mul_bb" @399 378 "__bi_mul_bw" @400 379 "__bi_pow5" @401 380 "__bi_set_b" @402 381 "__bi_set_d" @403 382 "__bi_set_w" @404 383 "__bi_shl_b" @405 384 "__bi_shl_w" @406 385 "__bi_shr_b" @407 386 "__bi_sub_mul_bw" @408 387 "__bi_wdiv_rem_pow2" @409 388 "__chdir2" @410 389 "__clear87" @411 390 "__closestream" @412 391 "__compute_dst_table" @413 392 "__const_HALF" @414 393 "__const_M_ONE" @415 394 "__const_NAN" @416 395 "__const_ONE" @417 396 "__const_TWO" @418 397 "__const_ZERO" @419 398 "__control87" @420 399 "__core" @421 400 "__crlf" @422 401 "__day" @423 402 "__defext" @424 403 "__dorand48" @425 404 "__dt_free" @426 405 "__dt_read" @427 406 "__dt_sort" @428 407 "__dt_split" @429 408 "__ea_free" @430 409 "__ea_get" @431 410 "__ea_put" @432 411 "__ea_remove" @433 412 "__ea_set_errno" @434 413 "__ea_write" @435 414 "__ead_add" @436 415 "__ead_clear" @437 416 "__ead_copy" @438 417 "__ead_count" @439 418 "__ead_create" @440 419 "__ead_delete" @441 420 "__ead_destroy" @442 421 "__ead_enum" @443 422 "__ead_fea2list_size" @444 423 "__ead_fea2list_to_fealist" @445 424 "__ead_fealist_to_fea2list" @446 425 "__ead_find" @447 426 "__ead_get_fea2list" @448 427 "__ead_get_flags" @449 428 "__ead_get_name" @450 429 "__ead_get_value" @451 430 "__ead_make_index" @452 431 "__ead_name_len" @453 432 "__ead_read" @454 433 "__ead_replace" @455 434 "__ead_size_buffer" @456 435 "__ead_sort" @457 436 "__ead_use_fea2list" @458 437 "__ead_value_size" @459 438 "__ead_write" @460 439 "__emx_getopt" @461 440 "__emxload_connect" @462 441 "__emxload_disconnect" @463 442 "__emxload_do_connect" @464 443 "__emxload_do_disconnect" @465 444 "__emxload_do_receive" @466 445 "__emxload_do_request" @467 446 "__emxload_do_wait" @468 447 "__emxload_env" @469 448 "__emxload_list_get" @470 449 "__emxload_list_start" @471 450 "__emxload_prog" @472 451 "__emxload_request" @473 452 "__emxload_stop" @474 453 "__emxload_this" @475 454 "__emxload_unload" @476 455 "__endbuf1" @477 456 "__endthread" @478 457 "__envargs" @479 458 "__err" @480 459 "__errno" @481 460 "__errno_fun" @482 461 "__execname" @483 462 "__exit" @484 463 "__exit_streams" @485 464 "__fbuf" @486 465 "__fcloseall" @487 466 "__fflush_nolock" @488 467 "__filesys" @489 468 "__fill" @490 469 "__flush" @491 470 "__flushstream" @492 471 "__fmutex_checked_close" @493 472 "__fmutex_checked_create" @494 473 "__fmutex_checked_open" @495 474 "__fmutex_close" @496 475 "__fmutex_create" @497 476 "__fmutex_dummy" @498 477 "__fmutex_open" @499 478 "__fnexplode" @500 479 "__fnexplodefree" @501 480 "__fngetdrive" @502 481 "__fnisabs" @503 482 "__fnisrel" @504 483 "__fnlwr" @505 484 "__fnlwr2" @506 485 "__fnslashify" @507 486 "__fpreset" @508 487 "__fseek_hdr" @509 488 "__fseek_nolock" @510 489 "__fsetmode" @511 490 "__fsopen" @512 491 "__ftell_nolock" @513 492 "__fullpath" @514 493 "__fwrite_nolock" @515 494 "__fxam" @516 495 "__fxaml" @517 496 "__getcwd1" @518 497 "__getcwd2" @519 498 "__getdrive" @520 499 "__getext" @521 500 "__getext2" @522 501 "__getname" @523 502 "__getpass1" @524 503 "__getpass2" @525 504 "__getprogname" @526 505 "__gettid" @527 506 "__getvol" @528 507 "__gmt2loc" @529 508 "__hcalloc" @530 509 "__heap_walk" @531 510 "__heapchk" @532 511 "__heapmin" @533 512 "__heapset" @534 513 "__hinitheap" @535 514 "__hmalloc" @536 515 "__hrealloc" @537 516 "__imphandle" @538 517 "__init_streams" @539 518 "__input" @540 519 "__int86" @541 520 "__isterm" @542 521 "__lcalloc" @543 522 "__libc_16to32" @544 523 "__libc_32to16" @545 524 "__libc_thunk1" @546 525 "__linitheap" @547 526 "__lmalloc" @548 527 "__loc2gmt" @549 528 "__lrealloc" @550 529 "__makepath" @551 530 "__memcount" @552 531 "__memdif" @553 532 "__memrchr" @554 533 "__memswap" @555 534 "__mfclose" @556 535 "__mfopen" @557 536 "__mheap" @558 537 "__mktime" @559 538 "__month_day_leap" @560 539 "__month_day_non_leap" @561 540 "__msize" @562 541 "__newstream" @563 542 "__openstream" @564 543 "__os2_bad" @565 544 "__output" @566 545 "__path" @567 546 "__read_kbd" @568 547 "__remext" @569 548 "__response" @570 549 "__rfnlwr" @571 550 "__rmtmp" @572 551 "__scrsize" @573 552 "__searchenv" @574 553 "__seek_hdr" @575 554 "__sfnlwr" @576 555 "__sleep2" @577 556 "__splitargs" @578 557 "__splitpath" @579 558 "__status87" @580 559 "__std_abort" @581 560 "__std_abs" @582 561 "__std_access" @583 562 "__std_acos" @584 563 "__std_acosl" @585 564 "__std_asctime" @586 565 "__std_asctime_r" @587 566 "__std_asin" @588 567 "__std_asinl" @589 568 "__std_atan" @590 569 "__std_atan2" @591 570 "__std_atan2l" @592 571 "__std_atanl" @593 572 "__std_atexit" @594 573 "__std_atof" @595 574 "__std_atofl" @596 575 "__std_atoi" @597 576 "__std_atol" @598 577 "__std_atoll" @599 578 "__std_basename" @600 579 "__std_bcmp" @601 580 "__std_bcopy" @602 581 "__std_brk" @603 582 "__std_bsearch" @604 583 "__std_bzero" @605 584 "__std_calloc" @606 585 "__std_cbrt" @607 586 "__std_cbrtl" @608 587 "__std_ceil" @609 588 "__std_ceill" @610 589 "__std_cfgetispeed" @611 590 "__std_cfgetospeed" @612 591 "__std_cfsetispeed" @613 592 "__std_cfsetospeed" @614 593 "__std_cfsetspeed" @615 594 "__std_chdir" @616 595 "__std_chdrive" @617 596 "__std_chmod" @618 597 "__std_chsize" @619 598 "__std_clearerr" @620 599 "__std_clock" @621 600 "__std_close" @622 601 "__std_closedir" @623 602 "__std_copysign" @624 603 "__std_copysignf" @625 604 "__std_copysignl" @626 605 "__std_cos" @627 606 "__std_cosh" @628 607 "__std_coshl" @629 608 "__std_cosl" @630 609 "__std_creat" @631 610 "__std_ctime" @632 611 "__std_ctime_r" @633 612 "__std_cuserid" @634 613 "__std_difftime" @635 614 "__std_dirname" @636 615 "__std_div" @637 616 "__std_drand48" @638 617 "__std_dup" @639 618 "__std_dup2" @640 619 "__std_eaccess" @641 620 "__std_endpwent" @642 621 "__std_eof" @643 622 "__std_erand48" @644 623 "__std_execl" @645 624 "__std_execle" @646 625 "__std_execlp" @647 626 "__std_execlpe" @648 627 "__std_execv" @649 628 "__std_execve" @650 629 "__std_execvp" @651 630 "__std_execvpe" @652 631 "__std_exit" @653 632 "__std_exp" @654 633 "__std_expand" @655 634 "__std_expl" @656 635 "__std_fabs" @657 636 "__std_fabsl" @658 637 "__std_fclose" @659 638 "__std_fcntl" @660 639 "__std_fdopen" @661 640 "__std_feof" @662 641 "__std_ferror" @663 642 "__std_fflush" @664 643 "__std_ffs" @665 644 "__std_fgetc" @666 645 "__std_fgetchar" @667 646 "__std_fgetpos" @668 647 "__std_fgets" @669 648 "__std_filelength" @670 649 "__std_fileno" @671 650 "__std_flock" @672 651 "__std_floor" @673 652 "__std_floorl" @674 653 "__std_flushall" @675 654 "__std_fmod" @676 655 "__std_fmodl" @677 656 "__std_fnmatch" @678 657 "__std_fopen" @679 658 "__std_fork" @680 659 "__std_fpathconf" @681 660 "__std_fprintf" @682 661 "__std_fputc" @683 662 "__std_fputchar" @684 663 "__std_fputs" @685 664 "__std_fread" @686 665 "__std_free" @687 666 "__std_freopen" @688 667 "__std_frexp" @689 668 "__std_frexpl" @690 669 "__std_fscanf" @691 670 "__std_fseek" @692 671 "__std_fseeko" @693 672 "__std_fsetpos" @694 673 "__std_fstat" @695 674 "__std_fsync" @696 675 "__std_ftell" @697 676 "__std_ftello" @698 677 "__std_ftime" @699 678 "__std_ftruncate" @700 679 "__std_ftw" @701 680 "__std_fwrite" @702 681 "__std_gcvt" @703 682 "__std_getchar" @704 683 "__std_getcwd" @705 684 "__std_getegid" @706 685 "__std_getenv" @707 686 "__std_geteuid" @708 687 "__std_getgid" @709 688 "__std_getgrgid" @710 689 "__std_getgrnam" @711 690 "__std_getgroups" @712 691 "__std_getlogin" @713 692 "__std_getopt" @714 693 "__std_getpagesize" @715 694 "__std_getpass" @716 695 "__std_getpgrp" @717 696 "__std_getpid" @718 697 "__std_getppid" @719 698 "__std_getpw" @720 699 "__std_getpwent" @721 700 "__std_getpwnam" @722 701 "__std_getpwuid" @723 702 "__std_getrlimit" @724 703 "__std_gets" @725 704 "__std_gettimeofday" @726 705 "__std_getuid" @727 706 "__std_getw" @728 707 "__std_getwd" @729 708 "__std_glob" @730 709 "__std_globfree" @731 710 "__std_gmtime" @732 711 "__std_gmtime_r" @733 712 "__std_hcreate" @734 713 "__std_hdestroy" @735 714 "__std_hsearch" @736 715 "__std_hypot" @737 716 "__std_hypotl" @738 717 "__std_imaxabs" @739 718 "__std_imaxdiv" @740 719 "__std_index" @741 720 "__std_insque" @742 721 "__std_ioctl" @743 722 "__std_isatty" @744 723 "__std_jrand48" @745 724 "__std_kill" @746 725 "__std_labs" @747 726 "__std_lcong48" @748 727 "__std_ldexp" @749 728 "__std_ldexpl" @750 729 "__std_ldiv" @751 730 "__std_lfind" @752 731 "__std_lltoa" @753 732 "__std_localeconv" @754 733 "__std_localtime" @755 734 "__std_localtime_r" @756 735 "__std_lockf" @757 736 "__std_log" @758 737 "__std_log10" @759 738 "__std_log10l" @760 739 "__std_logl" @761 740 "__std_longjmp" @762 741 "__std_lrand48" @763 742 "__std_lsearch" @764 743 "__std_lseek" @765 744 "__std_lstat" @766 745 "__std_ltoa" @767 746 "__std_malloc" @768 747 "__std_mblen" @769 748 "__std_mbstowcs" @770 749 "__std_mbtowc" @771 750 "__std_memccpy" @772 751 "__std_memchr" @773 752 "__std_memcmp" @774 753 "__std_memcpy" @775 754 "__std_memicmp" @776 755 "__std_memmove" @777 756 "__std_memset" @778 757 "__std_mkdir" @779 758 "__std_mkstemp" @780 759 "__std_mktemp" @781 760 "__std_mktime" @782 761 "__std_modf" @783 762 "__std_modfl" @784 763 "__std_mrand48" @785 764 "__std_nextafter" @786 765 "__std_nextafterf" @787 766 "__std_nextafterl" @788 767 "__std_nrand48" @789 768 "__std_open" @790 769 "__std_opendir" @791 770 "__std_pathconf" @792 771 "__std_pause" @793 772 "__std_pclose" @794 773 "__std_perror" @795 774 "__std_pipe" @796 775 "__std_popen" @797 776 "__std_posix_memalign" @798 777 "__std_pow" @799 778 "__std_powl" @800 779 "__std_printf" @801 780 "__std_putchar" @802 781 "__std_putenv" @803 782 "__std_puts" @804 783 "__std_putw" @805 784 "__std_qsort" @806 785 "__std_qsort_r" @807 786 "__std_raise" @808 787 "__std_rand" @809 788 "__std_read" @810 789 "__std_readdir" @811 790 "__std_readdir_r" @812 791 "__std_readv" @813 792 "__std_realloc" @814 793 "__std_realpath" @815 794 "__std_remove" @816 795 "__std_remque" @817 796 "__std_rename" @818 797 "__std_rewind" @819 798 "__std_rewinddir" @820 799 "__std_rindex" @821 800 "__std_rint" @822 801 "__std_rintl" @823 802 "__std_rmdir" @824 803 "__std_sbrk" @825 804 "__std_scanf" @826 805 "__std_seed48" @827 806 "__std_seekdir" @828 807 "__std_select" @829 808 "__std_setbuf" @830 809 "__std_setbuffer" @831 810 "__std_setenv" @832 811 "__std_setgid" @833 812 "__std_setjmp" @834 813 "__std_setlocale" @835 814 "__std_setmode" @836 815 "__std_setpgid" @837 816 "__std_setpwent" @838 817 "__std_setrlimit" @839 818 "__std_setsid" @840 819 "__std_settimeofday" @841 820 "__std_setuid" @842 821 "__std_setvbuf" @843 822 "__std_sigaction" @844 823 "__std_sigaddset" @845 824 "__std_sigdelset" @846 825 "__std_sigemptyset" @847 826 "__std_sigfillset" @848 827 "__std_sigismember" @849 828 "__std_siglongjmp" @850 829 "__std_signal" @851 830 "__std_sigpending" @852 831 "__std_sigprocmask" @853 832 "__std_sigsetjmp" @854 833 "__std_sigsuspend" @855 834 "__std_sin" @856 835 "__std_sinh" @857 836 "__std_sinhl" @858 837 "__std_sinl" @859 838 "__std_sleep" @860 839 "__std_snprintf" @861 840 "__std_sopen" @862 841 "__std_spawnl" @863 842 "__std_spawnle" @864 843 "__std_spawnlp" @865 844 "__std_spawnlpe" @866 845 "__std_spawnv" @867 846 "__std_spawnve" @868 847 "__std_spawnvp" @869 848 "__std_spawnvpe" @870 849 "__std_sprintf" @871 850 "__std_sqrt" @872 851 "__std_sqrtl" @873 852 "__std_srand" @874 853 "__std_srand48" @875 854 "__std_sscanf" @876 855 "__std_stat" @877 856 "__std_strcat" @878 857 "__std_strchr" @879 858 "__std_strcmp" @880 859 "__std_strcoll" @881 860 "__std_strcpy" @882 861 "__std_strcspn" @883 862 "__std_strdup" @884 863 "__std_strerror" @885 864 "__std_strerror_r" @886 865 "__std_strftime" @887 866 "__std_stricmp" @888 867 "__std_strlen" @889 868 "__std_strlwr" @890 869 "__std_strncat" @891 870 "__std_strncmp" @892 871 "__std_strncpy" @893 872 "__std_strnicmp" @894 873 "__std_strnset" @895 874 "__std_strpbrk" @896 875 "__std_strptime" @897 876 "__std_strrchr" @898 877 "__std_strrev" @899 878 "__std_strset" @900 879 "__std_strspn" @901 880 "__std_strstr" @902 881 "__std_strtod" @903 882 "__std_strtof" @904 883 "__std_strtoimax" @905 884 "__std_strtok" @906 885 "__std_strtok_r" @907 886 "__std_strtol" @908 887 "__std_strtold" @909 888 "__std_strtoll" @910 889 "__std_strtoul" @911 890 "__std_strtoull" @912 891 "__std_strtoumax" @913 892 "__std_strupr" @914 893 "__std_strxfrm" @915 894 "__std_swab" @916 895 "__std_sys_errlist" @917 896 "__std_sys_nerr" @918 897 "__std_sysconf" @919 898 "__std_system" @920 899 "__std_tan" @921 900 "__std_tanh" @922 901 "__std_tanhl" @923 902 "__std_tanl" @924 903 "__std_tcdrain" @925 904 "__std_tcflow" @926 905 "__std_tcflush" @927 906 "__std_tcgetattr" @928 907 "__std_tcgetpgrp" @929 908 "__std_tcsendbreak" @930 909 "__std_tcsetattr" @931 910 "__std_tcsetpgrp" @932 911 "__std_tdelete" @933 912 "__std_tell" @934 913 "__std_telldir" @935 914 "__std_tempnam" @936 915 "__std_tfind" @937 916 "__std_time" @938 917 "__std_times" @939 918 "__std_tmpfile" @940 919 "__std_tmpnam" @941 920 "__std_trunc" @942 921 "__std_truncate" @943 922 "__std_truncl" @944 923 "__std_tsearch" @945 924 "__std_ttyname" @946 925 "__std_twalk" @947 926 "__std_tzset" @948 927 "__std_ulimit" @949 928 "__std_ulltoa" @950 929 "__std_ultoa" @951 930 "__std_umask" @952 931 "__std_uname" @953 932 "__std_ungetc" @954 933 "__std_unlink" @955 934 "__std_unsetenv" @956 935 "__std_usleep" @957 936 "__std_utime" @958 937 "__std_utimes" @959 938 "__std_vfprintf" @960 939 "__std_vfscanf" @961 940 "__std_vprintf" @962 941 "__std_vscanf" @963 942 "__std_vsnprintf" @964 943 "__std_vsprintf" @965 944 "__std_vsscanf" @966 945 "__std_wait" @967 946 "__std_waitpid" @968 947 "__std_wcstombs" @969 948 "__std_wctomb" @970 949 "__std_write" @971 950 "__std_writev" @972 951 "__stream_read" @973 952 "__stream_write" @974 953 "__strncpy" @975 954 "__swchar" @976 955 "__sys_dump_heap_objs" @977 956 "__tcalloc" @978 957 "__tfree" @979 958 "__theapmin" @980 959 "__threadstore" @981 960 "__tmalloc" @982 961 "__tmpbuf1" @983 962 "__tmpidx_lock" @984 963 "__tmpidx_unlock" @985 964 "__tmpidxnam" @986 965 "__trealloc" @987 966 "__trslash" @988 967 "__uaddmem" @989 968 "__ucalloc" @990 969 "__uclose" @991 970 "__ucreate" @992 971 "__ucreate2" @993 972 "__udefault" @994 973 "__udestroy" @995 974 "__uflags" @996 975 "__uheap_type" @997 976 "__uheap_walk" @998 977 "__uheap_walk2" @999 978 "__uheapchk" @1000 979 "__uheapmin" @1001 980 "__uheapset" @1002 981 "__uldiv" @1003 982 "__um_addmem_nolock" @1004 983 "__um_alloc_no_lock" @1005 984 "__um_crumb_free_maybe_lock" @1006 985 "__um_default_alloc" @1007 986 "__um_default_expand" @1008 987 "__um_default_release" @1009 988 "__um_default_shrink" @1010 989 "__um_find_bucket" @1011 990 "__um_free_maybe_lock" @1012 991 "__um_init_default_regular_heap" @1013 992 "__um_init_default_tiled_heap" @1014 993 "__um_lump_alloc" @1015 994 "__um_lump_coalesce_free" @1016 995 "__um_lump_free_maybe_lock" @1017 996 "__um_lump_link_heap" @1018 997 "__um_lump_make_free" @1019 998 "__um_lump_unlink_bucket" @1020 999 "__um_lump_unlink_heap" @1021 1000 "__um_realloc" @1022 1001 "__um_seg_addmem" @1023 1002 "__um_seg_setmem" @1024 1003 "__um_walk_error" @1025 1004 "__um_walk_no_lock" @1026 1005 "__umalloc" @1027 1006 "__ungetc_nolock" @1028 1007 "__uopen" @1029 1008 "__ustats" @1030 1009 "__utcalloc" @1031 1010 "__utdefault" @1032 1011 "__utmalloc" @1033 1012 "__vsopen" @1034 1013 "__warn" @1035 1014 "__wildcard" @1036 1015 "__year_day" @1037 1016 "_argz_delete" @1038 1017 "_catclose" @1039 1018 "_catgets" @1040 1019 "_catopen" @1041 1020 "_dbm_clearerr" @1042 1021 "_dbm_close" @1043 1022 "_dbm_delete" @1044 1023 "_dbm_dirfno" @1045 1024 "_dbm_error" @1046 1025 "_dbm_fetch" @1047 1026 "_dbm_firstkey" @1048 1027 "_dbm_nextkey" @1049 1028 "_dbm_open" @1050 1029 "_dbm_store" @1051 1030 "_dbopen" @1052 1031 "_err_set_exit" @1053 1032 "_err_set_file" @1054 1033 "_errc" @1055 1034 "_errx" @1056 1035 "_getopt_long" @1057 1036 "_heapsort" @1058 1037 "_initstate" @1059 1038 "_isalnum" @1060 1039 "_isalpha" @1061 1040 "_isascii" @1062 1041 "_isblank" @1063 1042 "_iscntrl" @1064 1043 "_isdigit" @1065 1044 "_isgraph" @1066 1045 "_ishexnumber" @1067 1046 "_islower" @1068 1047 "_isnumber" @1069 1048 "_isprint" @1070 1049 "_ispunct" @1071 1050 "_isspace" @1072 1051 "_isupper" @1073 1052 "_isxdigit" @1074 1053 "_lchmod" @1075 1054 "_mergesort" @1076 1055 "_mpool_close" @1077 1056 "_mpool_filter" @1078 1057 "_mpool_get" @1079 1058 "_mpool_new" @1080 1059 "_mpool_open" @1081 1060 "_mpool_put" @1082 1061 "_mpool_sync" @1083 1062 "_posix_spawn" @1084 1063 "_posix_spawn_file_actions_addclose" @1085 1064 "_posix_spawn_file_actions_adddup2" @1086 1065 "_posix_spawn_file_actions_addopen" @1087 1066 "_posix_spawn_file_actions_destroy" @1088 1067 "_posix_spawn_file_actions_init" @1089 1068 "_posix_spawnattr_destroy" @1090 1069 "_posix_spawnattr_getflags" @1091 1070 "_posix_spawnattr_getpgroup" @1092 1071 "_posix_spawnattr_getschedparam" @1093 1072 "_posix_spawnattr_getschedpolicy" @1094 1073 "_posix_spawnattr_getsigdefault" @1095 1074 "_posix_spawnattr_getsigmask" @1096 1075 "_posix_spawnattr_init" @1097 1076 "_posix_spawnattr_setflags" @1098 1077 "_posix_spawnattr_setpgroup" @1099 1078 "_posix_spawnattr_setschedparam" @1100 1079 "_posix_spawnattr_setschedpolicy" @1101 1080 "_posix_spawnattr_setsigdefault" @1102 1081 "_posix_spawnattr_setsigmask" @1103 1082 "_posix_spawnp" @1104 1083 "_radixsort" @1105 1084 "_random" @1106 1085 "_reallocf" @1107 1086 "_regcomp" @1108 1087 "_regerror" @1109 1088 "_regexec" @1110 1089 "_regfree" @1111 1090 "_setprogname" @1112 1091 "_setstate" @1113 1092 "_sig_info" @1114 1093 "_sradixsort" @1115 1094 "_srandom" @1116 1095 "_srandomdev" @1117 1096 "_stpcpy" @1118 1097 "_strcasestr" @1119 1098 "_strlcat" @1120 1099 "_strlcpy" @1121 1100 "_strnstr" @1122 1101 "_strsep" @1123 1102 "_strsignal" @1124 1103 "_sys_exception" @1125 1104 "_sys_nsig" @1126 1105 "_sys_siglist" @1127 1106 "_sys_signame" @1128 1107 "_toascii" @1129 1108 "_tolower" @1130 1109 "_toupper" @1131 1110 "_verr" @1132 1111 "_verrc" @1133 1112 "_verrx" @1134 1113 "_vwarn" @1135 1114 "_vwarnc" @1136 1115 "_vwarnx" @1137 1116 "_warnc" @1138 1117 "_warnx" @1139 1118 ; new stuff. 1103 1119 1104 ; LIBGCCSTART1105 ; GCC333.DLL - move this!!!1106 "__Unwind_Backtrace" @11221107 "__Unwind_FindEnclosingFunction" @11231108 "__Unwind_GetCFA" @11241109 "__Unwind_Resume_or_Rethrow" @11251110 "___gcc_personality_v0" @1126 ; (this is a bug in the gcc 3.2.2 config, it should've been there too.)1111 ; LIBGCCEND1112 1113 "__std_strtok_r" @11271114 "___libc_LogDumpHex" @11281115 "DosAllocMemEx" @11291116 "DosAllocSharedMemEx" @11301117 "DosCloseEventSemEx" @11311118 "DosCloseMutexSemEx" @11321119 "DosCreateEventSemEx" @11331120 "DosCreateMutexSemEx" @11341121 "DosFreeMemEx" @11351122 "DosGetNamedSharedMemEx" @11361123 "DosGetSharedMemEx" @11371124 "DosOpenEventSemEx" @11381125 "DosOpenMutexSemEx" @11391126 "__atfork_callback" @11401127 "__std_getrlimit" @11411128 "__std_setrlimit" @11421129 "___libc_ForkDefaultModuleCallback" @11431130 "___libc_ForkRegisterModule" @11441131 "___isctype" @11451132 "___libc_TranslateCodepage" @11461133 "__std_eaccess" @11471134 "___libc_TcpipAllocFH43" @11481135 "___libc_TcpipAllocFH44" @11491136 "___libc_TcpipAllocFHEx43" @11501137 "___libc_TcpipAllocFHEx44" @11511138 "___libc_Tcpipbsdselect43" @11521139 "___libc_Tcpipbsdselect44" @1153 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/locale/setlocale.c
-
Property cvs2svn:cvs-rev
changed from
1.5
to1.6
r1456 r1457 356 356 *mbcs = (uconv_attr.mb_max_len > 1); 357 357 358 memset(au2MBCSPrefixs, 0, 256/4);358 bzero(au2MBCSPrefixs, 256/4); 359 359 for (i = 0; i < 256; i++) 360 360 if (uchSeqlen[i] != 255) … … 548 548 || IS_POSIX_LOCALE(pszLocale)) 549 549 { 550 memset(&pCtype->ausfType[128], 0, 128 * sizeof(pCtype->ausfType[0]));550 bzero(&pCtype->ausfType[128], 128 * sizeof(pCtype->ausfType[0])); 551 551 for (i = 128; i < 255; i++) 552 552 { … … 1519 1519 */ 1520 1520 struct temp_locale *pTemp = alloca(sizeof(struct temp_locale)); 1521 memset(pTemp, 0, sizeof(struct temp_locale));1521 bzero(pTemp, sizeof(struct temp_locale)); 1522 1522 1523 1523 rc = localeDo(pTemp, iCategory, pszLocaleCopy, fDefaultValue); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/malloc/ialloc.c
-
Property cvs2svn:cvs-rev
changed from
1.4
to1.5
r1456 r1457 39 39 crumb->x.used.size = size; 40 40 if (flags & _UMFI_ZERO) 41 memset (result, 0, size);41 bzero (result, size); 42 42 return result; 43 43 } … … 69 69 crate->used += 1; 70 70 if (flags & _UMFI_ZERO) /* TODO: Not always required */ 71 memset (result, 0, size);71 bzero (result, size); 72 72 return result; 73 73 } … … 199 199 200 200 if (flags & _UMFI_ZERO) /* TODO: Not always required */ 201 memset (block, 0, size);201 bzero (block, size); 202 202 203 203 return block; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/malloc/uheapmin.c
-
Property cvs2svn:cvs-rev
changed from
1.3
to1.4
r1456 r1457 59 59 !_BLOCK_CLEAN) != h) 60 60 { 61 memset (seg->mem, 0, shrink_size);61 bzero (seg->mem, shrink_size); 62 62 remove = 1; 63 63 } -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/misc/getvol.c
-
Property cvs2svn:cvs-rev
changed from
1.5
to1.6
r1456 r1457 26 26 FSINFO fsinfo; 27 27 28 memset (&fsinfo, 0, sizeof (fsinfo));28 bzero (&fsinfo, sizeof (fsinfo)); 29 29 FS_SAVE_LOAD(); 30 30 rc = DosQueryFSInfo (drive - 'A' + 1, FSIL_VOLSER, &fsinfo, -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/process/thread_internals.c
-
Property cvs2svn:cvs-rev
changed from
1.3
to1.4
r1456 r1457 67 67 static void threadInit(__LIBC_PTHREAD pThrd) 68 68 { 69 memset(pThrd, 0, sizeof(*pThrd));69 bzero(pThrd, sizeof(*pThrd)); 70 70 pThrd->iRand = 1; 71 71 __libc_Back_threadInit(pThrd); … … 139 139 int __libc_ThreadRegisterTermCallback(__LIBC_PTHREADTERMCBREGREC pRegRec) 140 140 { 141 LIBCLOG_ENTER("pRegRec=%p {%p, %u, %p}\n", (void *)pRegRec, 141 LIBCLOG_ENTER("pRegRec=%p {%p, %u, %p}\n", (void *)pRegRec, 142 142 pRegRec ? (void *)pRegRec->pNext : NULL, 143 pRegRec ? pRegRec->fFlags : 0, 143 pRegRec ? pRegRec->fFlags : 0, 144 144 pRegRec ? (void *)pRegRec->pfnCallback : NULL); 145 145 … … 147 147 * Validate input. 148 148 */ 149 if ( pRegRec->pNext 149 if ( pRegRec->pNext 150 150 || !pRegRec->pfnCallback 151 151 || pRegRec->fFlags) … … 162 162 */ 163 163 _smutex_request(&gsmtxTerm); 164 if ( !pRegRec->pNext 164 if ( !pRegRec->pNext 165 165 && pRegRec != gpTermTail) 166 166 { -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/str/strspn.c
-
Property cvs2svn:cvs-rev
changed from
1.3
to1.4
r1456 r1457 9 9 size_t i; 10 10 11 memset (table, 0, 256);11 bzero (table, sizeof(256)); 12 12 while (*string2 != 0) 13 13 table[(unsigned char)*string2++] = 1; … … 18 18 return i; 19 19 } 20 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/sys/DosEx.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r1456 r1457 410 410 */ 411 411 pRet->pNext = NULL; 412 memset(&pRet->u, 0, sizeof(pRet->u));412 bzero(&pRet->u, sizeof(pRet->u)); 413 413 414 414 if (pPool->apTails[enmType]) -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/sys/__fcntl.c
-
Property cvs2svn:cvs-rev
changed from
1.8
to1.9
r1456 r1457 341 341 { 342 342 FILELOCKL aflock[2]; 343 memset(&aflock[(fLock + 1) & 1], 0, sizeof(aflock[0]));343 bzero(&aflock[(fLock + 1) & 1], sizeof(aflock[0])); 344 344 aflock[fLock].lOffset = offStart; 345 345 aflock[fLock].lRange = cbRange; … … 366 366 } 367 367 #endif 368 memset(&aflock[(fLock + 1) & 1], 0, sizeof(aflock[0]));368 bzero(&aflock[(fLock + 1) & 1], sizeof(aflock[0])); 369 369 aflock[fLock].lOffset = offStart; 370 370 aflock[fLock].lRange = cbRange; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/sys/__fstat.c
-
Property cvs2svn:cvs-rev
changed from
1.9
to1.10
r1456 r1457 44 44 * Use query handle type to figure out the file type. 45 45 */ 46 memset(pStat, 0, sizeof(*pStat));46 bzero(pStat, sizeof(*pStat)); 47 47 rc = DosQueryHType(hFile, &ulType, &flFlags); 48 48 if (rc) -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/sys/__select.c
-
Property cvs2svn:cvs-rev
changed from
1.4
to1.5
r1456 r1457 92 92 return -1; 93 93 } 94 memset(pLookAhead, 0, cb);94 bzero(pLookAhead, cb); 95 95 } 96 96 FD_SET(i, pLookAhead); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/sys/__stat.c
-
Property cvs2svn:cvs-rev
changed from
1.9
to1.10
r1456 r1457 36 36 FS_VAR(); 37 37 38 memset(pStat, 0, sizeof(*pStat));38 bzero(pStat, sizeof(*pStat)); 39 39 40 40 /* -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/sys/filefind.c
-
Property cvs2svn:cvs-rev
changed from
1.8
to1.9
r1456 r1457 177 177 #endif 178 178 FS_SAVE_LOAD(); 179 memset(&pFD->achBuffer[0], 0, sizeof(pFD->achBuffer));179 bzero(&pFD->achBuffer[0], sizeof(pFD->achBuffer)); 180 180 rc = DosFindFirst((PCSZ)pszName, 181 181 &pFD->hdir, -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/sys/filehandles.c
-
Property cvs2svn:cvs-rev
changed from
1.9
to1.10
r1456 r1457 250 250 */ 251 251 _fmutex_close(&gmtx); 252 memset(&gmtx, 0, sizeof(gmtx));252 bzero(&gmtx, sizeof(gmtx)); 253 253 254 254 free(gpapFHs); … … 569 569 { 570 570 gpapFHs = papNewFHs; 571 memset(&gpapFHs[gcFHs], 0, (cNewMaxFHs - gcFHs) * sizeof(gpapFHs[0]));571 bzero(&gpapFHs[gcFHs], (cNewMaxFHs - gcFHs) * sizeof(gpapFHs[0])); 572 572 gcFHs = cNewMaxFHs; 573 573 } -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/sys/logstrict.c
-
Property cvs2svn:cvs-rev
changed from
1.10
to1.11
r1456 r1457 345 345 */ 346 346 pszStart = pszEnv; 347 while ( !(ch = *pszEnv)&& ch != '+' && ch != '-' && ch != ' ' && ch != '\t')347 while ((ch = *pszEnv) != '\0' && ch != '+' && ch != '-' && ch != ' ' && ch != '\t') 348 348 pszEnv++; 349 349 … … 355 355 if ( cch == 3 356 356 && (pszStart[0] == 'a' || pszStart[0] == 'A') 357 && (pszStart[1] == ' L' || pszStart[1] == 'L')358 && (pszStart[2] == ' L' || pszStart[2] == 'L')357 && (pszStart[1] == 'l' || pszStart[1] == 'L') 358 && (pszStart[2] == 'l' || pszStart[2] == 'L') 359 359 ) 360 360 { /* all */ … … 1066 1066 /* write line */ 1067 1067 __libc_logWrite(pInst, fGroupAndFlags, pszMsg, pszChar - pszMsg, 0); 1068 1068 1069 1069 /* next */ 1070 1070 off += 16; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/sys/sharedpm.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r1456 r1457 63 63 #include <string.h> 64 64 #include <errno.h> 65 #include <stdio.h> 65 66 #include <sys/types.h> 66 67 #include <emx/startup.h> … … 71 72 #include <InnoTekLIBC/logstrict.h> 72 73 #include "syscalls.h" 74 75 76 /******************************************************************************* 77 * Defined Constants And Macros * 78 *******************************************************************************/ 79 /** Validates that a pointer is within the shared memory. */ 80 #define SPM_VALID_PTR(ptr) ((uintptr_t)(ptr) - (uintptr_t)gpSPMHdr < gpSPMHdr->cb) 81 /** Validates that a pointer is within the shared memory or is NULL. */ 82 #define SPM_VALID_PTR_NULL(ptr) (!(ptr) || (uintptr_t)(ptr) - (uintptr_t)gpSPMHdr < gpSPMHdr->cb) 83 /** Asserts that a pointer is correct. */ 84 //#define SPM_ASSERT_PTR_NULL(ptr) LIBC_ASSERTM(SPM_VALID_PTR_NULL(ptr), "Invalid pointer %p. expr='%s'\n", (void *)(ptr), #ptr); 85 #define SPM_ASSERT_PTR_NULL(ptr) (SPM_VALID_PTR_NULL(ptr) ? (void)0 \ 86 : __libc_LogAssert(__LIBC_LOG_INSTANCE, __LIBC_LOG_GROUP, __PRETTY_FUNCTION__, __FILE__, __LINE__, #ptr, \ 87 "Invalid pointer %p. expr='%s'\n", (void *)(ptr), #ptr)) 73 88 74 89 … … 93 108 static int spmForkChild1(__LIBC_PFORKHANDLE pForkHandle, __LIBC_FORKOP enmOperation); 94 109 static void spmCrtInit1(void); 95 static int spmRequestMutex( void);96 static int spmReleaseMutex( void);110 static int spmRequestMutex(__LIBC_PSPMXCPTREGREC pRegRec); 111 static int spmReleaseMutex(__LIBC_PSPMXCPTREGREC pRegRec); 97 112 static int spmInit(void); 98 113 static VOID APIENTRY spmExitList(ULONG ulReason); 99 static void spm Dereference(__LIBC_PSPMPROCESS pProcess);114 static void spmZombieOrFree(__LIBC_PSPMPROCESS pProcess); 100 115 static __LIBC_PSPMPROCESS spmRegisterSelf(pid_t pid, pid_t pidParent); 101 116 static __LIBC_PSPMPROCESS spmAllocProcess(void); 102 117 static void spmFreeProcess(__LIBC_PSPMPROCESS pProcess); 103 118 static void *spmAlloc(size_t cbSize); 119 static void *spmAllocSub(size_t cbSize); 104 120 static int spmFree(void *pv); 121 static ULONG _System spmXcptHandler(PEXCEPTIONREPORTRECORD pRepRec, PEXCEPTIONREGISTRATIONRECORD pRegRec, PCONTEXTRECORD pCtx, PVOID pvWhatever); 122 static int spmCheck(int fBreakpoint, int fVerbose); 105 123 106 124 … … 130 148 { 131 149 LIBCLOG_ENTER("enmDeathReason=%d iExitCode=%d\n", enmDeathReason, iExitCode); 132 PPIB pPib; 133 PTIB pTib; 134 int fFree = 0; 150 PPIB pPib; 151 PTIB pTib; 152 __LIBC_SPMXCPTREGREC RegRec; 153 int fFree = 0; 135 154 FS_VAR(); 136 155 … … 147 166 FS_SAVE_LOAD(); 148 167 DosGetInfoBlocks(&pTib, &pPib); 149 if (!spmRequestMutex( ))168 if (!spmRequestMutex(&RegRec)) 150 169 { 151 170 /* 152 171 * Free unborn children. 153 172 */ 154 __LIBC_PSPMPROCESS pProcessPrev = NULL;155 173 __LIBC_PSPMPROCESS pProcess = gpSPMHdr->apHeads[__LIBC_PROCSTATE_EMBRYO]; 156 174 pid_t pid = pPib->pib_ulpid; 157 175 while (pProcess) 158 176 { 177 /* sanity */ 178 LIBC_ASSERTM(pProcess->enmState == __LIBC_PROCSTATE_EMBRYO, "Found non embryo process in embryo list! enmState=%d pid=%d\n", 179 pProcess->enmState, pProcess->pid); 180 LIBC_ASSERTM(pProcess->cReferences <= 1, "Invalid reference count of a process in the embryo list! cReferences=%d pid=%d\n", 181 pProcess->cReferences, pProcess->pid); 182 183 /* our child? */ 159 184 if (pProcess->pidParent == pid) 160 185 { 161 do 162 { 163 /* unlink it. */ 164 if (pProcessPrev) 165 pProcessPrev->pNext = pProcess->pNext; 166 else 167 gpSPMHdr->apHeads[__LIBC_PROCSTATE_EMBRYO] = pProcess->pNext; 168 169 /* dereference it. */ 170 spmDereference(pProcess); 171 172 /* next */ 173 if (!(pProcess = pProcessPrev)) 174 pProcess = pProcess->pNext; 175 } while (pProcess && pProcess->pidParent == pid); 176 177 if (!pProcess) 178 break; 186 __LIBC_PSPMPROCESS pProcessNext = pProcess->pNext; 187 188 /* Free it safely. */ 189 spmZombieOrFree(pProcess); 190 191 /* next */ 192 pProcess = pProcessNext; 193 continue; 179 194 } 180 195 181 196 /* next */ 182 pProcessPrev = pProcess;183 197 pProcess = pProcess->pNext; 184 198 } … … 201 215 /* Determin whether to free shared stuff. */ 202 216 if (pProcess->cSPMOpens <= 1) 217 { 203 218 pProcess->cSPMOpens = 0; 219 fFree = 1; 220 } 204 221 else 205 222 pProcess->cSPMOpens--; 206 223 207 /* dereference our selves. */208 spm Dereference(pProcess);224 /* free our selves or become a zombie. */ 225 spmZombieOrFree(pProcess); 209 226 } 210 227 … … 212 229 * We're done, free the mutex. 213 230 */ 214 spmReleaseMutex(); 215 } 216 231 spmReleaseMutex(&RegRec); 232 } 233 234 #if 0 // @todo make this only when not terminating the process, it's a waste of time else wise. 217 235 /* 218 236 * Close the memory and semaphore. … … 226 244 DosFreeMem(gpSPMHdr); 227 245 } 246 #endif 228 247 229 248 FS_RESTORE(); … … 256 275 else 257 276 { 258 PTIB pTib; 259 PPIB pPib; 277 __LIBC_SPMXCPTREGREC RegRec; 278 PTIB pTib; 279 PPIB pPib; 280 FS_VAR() 281 FS_SAVE_LOAD(); 260 282 DosGetInfoBlocks(&pTib, &pPib); 261 if (spmRequestMutex( ))283 if (spmRequestMutex(&RegRec)) 262 284 LIBCLOG_RETURN_P(NULL); 263 285 if (!gpSPMSelf) … … 265 287 else 266 288 pProcess = spmRegisterSelf(pPib->pib_ulpid, pPib->pib_ulppid); 267 spmReleaseMutex(); 289 spmReleaseMutex(&RegRec); 290 FS_RESTORE(); 268 291 } 269 292 … … 283 306 { 284 307 LIBCLOG_ENTER("pidParent=%d\n", pidParent); 285 __LIBC_PSPMPROCESS pProcess; 308 __LIBC_SPMXCPTREGREC RegRec; 309 __LIBC_PSPMPROCESS pProcess; 286 310 287 311 /* … … 297 321 * Get mutex. 298 322 */ 299 if (spmRequestMutex( ))323 if (spmRequestMutex(&RegRec)) 300 324 LIBCLOG_RETURN_P(NULL); 301 325 … … 309 333 * Initialize the new process block. 310 334 */ 311 memset(pProcess, 0, gpSPMHdr->cbProcess);312 335 pProcess->uVersion = SPM_VERSION; 313 336 pProcess->cReferences = 1; … … 319 342 /* link into list. */ 320 343 pProcess->pNext = gpSPMHdr->apHeads[__LIBC_PROCSTATE_EMBRYO]; 344 if (pProcess->pNext) 345 pProcess->pNext->pPrev = pProcess; 346 pProcess->pPrev = NULL; 321 347 gpSPMHdr->apHeads[__LIBC_PROCSTATE_EMBRYO] = pProcess; 322 348 } 323 349 324 spmReleaseMutex( );350 spmReleaseMutex(&RegRec); 325 351 LIBCLOG_RETURN_P(pProcess); 326 352 } … … 339 365 { 340 366 LIBCLOG_ENTER("pid=%u\n", pid); 341 __LIBC_PSPMPROCESS pProcess; 367 __LIBC_SPMXCPTREGREC RegRec; 368 __LIBC_PSPMPROCESS pProcess; 342 369 343 370 /* … … 353 380 * Request mutex. 354 381 */ 355 if (spmRequestMutex( ))382 if (spmRequestMutex(&RegRec)) 356 383 LIBCLOG_RETURN_P(NULL); 357 384 … … 374 401 * Release mutex and return. 375 402 */ 376 spmReleaseMutex( );403 spmReleaseMutex(&RegRec); 377 404 LIBCLOG_RETURN_P(pProcess); 378 405 } … … 391 418 { 392 419 LIBCLOG_ENTER("pid=%d enmState=%d\n", pid, enmState); 393 __LIBC_PSPMPROCESS pProcess; 420 __LIBC_SPMXCPTREGREC RegRec; 421 __LIBC_PSPMPROCESS pProcess; 394 422 395 423 /* … … 405 433 * Request mutex. 406 434 */ 407 if (spmRequestMutex( ))435 if (spmRequestMutex(&RegRec)) 408 436 LIBCLOG_RETURN_P(NULL); 409 437 … … 423 451 * Release mutex and return. 424 452 */ 425 spmReleaseMutex( );453 spmReleaseMutex(&RegRec); 426 454 LIBCLOG_RETURN_P(pProcess); 427 455 } … … 438 466 { 439 467 LIBCLOG_ENTER("pProcess=%p\n", (void *)pProcess); 468 __LIBC_SPMXCPTREGREC RegRec; 440 469 441 470 /* … … 448 477 * Obtain semaphore. 449 478 */ 450 if (spmRequestMutex( ))479 if (spmRequestMutex(&RegRec)) 451 480 LIBCLOG_RETURN_INT(-1); 452 481 … … 457 486 if (pProcess->cReferences > 0) 458 487 pProcess->cReferences--; 488 /* 489 * Free the process. 490 */ 459 491 if (pProcess->cReferences == 0) 460 {461 /*462 * Unlink it and dispose of it.463 */464 __LIBC_PSPMPROCESS pPrev;465 if ((pPrev = gpSPMHdr->apHeads[pProcess->enmState]) != pProcess)466 {467 while (pPrev->pNext != pProcess)468 pPrev = pPrev->pNext;469 if (!pPrev)470 {471 LIBC_ASSERTM_FAILED("Invalid parameter! Invalid process! %p\n", (void *)pProcess);472 spmReleaseMutex();473 LIBCLOG_RETURN_INT(-1);474 }475 pPrev->pNext = pProcess->pNext;476 }477 else478 gpSPMHdr->apHeads[pProcess->enmState] = pProcess->pNext;479 480 /*481 * Free associated memory and move the free list.482 */483 492 spmFreeProcess(pProcess); 484 }485 493 486 494 /* 487 495 * Done. 488 496 */ 489 spmReleaseMutex( );497 spmReleaseMutex(&RegRec); 490 498 LIBCLOG_RETURN_INT(0); 491 499 } … … 499 507 * @returns 0 on success. 500 508 * @returns -1 and errno on failure. 501 * @remark Don't think of calling this if you're not LIBC! 502 */ 503 int __libc_spmLock(void) 509 * @param pRegRec Pointer to the exception handler registration record. 510 * @remark Don't even think of calling this if you're not LIBC! 511 */ 512 int __libc_spmLock(__LIBC_PSPMXCPTREGREC pRegRec) 504 513 { 505 514 LIBCLOG_ENTER("\n"); 506 int rc = spmRequestMutex( );515 int rc = spmRequestMutex(pRegRec); 507 516 LIBCLOG_RETURN_INT(rc); 508 517 } … … 513 522 * 514 523 * @returns 0 on success. 515 * @returns 1 on failure. 516 * @remark Don't think of calling this if you're not LIBC! 517 */ 518 int __libc_spmUnlock(void) 524 * @returns -1 on and errno failure. 525 * @param pRegRec Pointer to the exception handler registration record. 526 * @remark Don't even think of calling this if you're not LIBC! 527 */ 528 int __libc_spmUnlock(__LIBC_PSPMXCPTREGREC pRegRec) 519 529 { 520 530 LIBCLOG_ENTER("\n"); 521 int rc = spmReleaseMutex( );531 int rc = spmReleaseMutex(pRegRec); 522 532 LIBCLOG_RETURN_INT(rc); 523 533 } … … 535 545 { 536 546 LIBCLOG_ENTER("cbSize=%d\n", cbSize); 537 void *pvRet; 547 __LIBC_SPMXCPTREGREC RegRec; 548 void *pvRet; 538 549 539 550 /* … … 549 560 * Request access to shared memory. 550 561 */ 551 if (spmRequestMutex( ))562 if (spmRequestMutex(&RegRec)) 552 563 LIBCLOG_RETURN_P(NULL); 553 564 … … 558 569 * Release semaphore and return. 559 570 */ 560 spmReleaseMutex( );571 spmReleaseMutex(&RegRec); 561 572 LIBCLOG_RETURN_P(pvRet); 562 573 } … … 575 586 { 576 587 LIBCLOG_ENTER("pv=%p\n", pv); 588 __LIBC_SPMXCPTREGREC RegRec; 577 589 int rc; 578 590 … … 582 594 if (!pv) 583 595 LIBCLOG_RETURN_INT(0); 584 if ( (uintptr_t)pv - (uintptr_t)gpSPMHdr->pPoolHead >= gpSPMHdr->cb 585 || SPM_POOL_ALIGN((uintptr_t)pv) != (uintptr_t)pv) 596 if (!SPM_VALID_PTR(pv) || SPM_POOL_ALIGN((uintptr_t)pv) != (uintptr_t)pv) 586 597 { 587 598 LIBC_ASSERTM_FAILED("Invalid pointer %p\n", pv); … … 593 604 * Take sem. 594 605 */ 595 if (spmRequestMutex( ))606 if (spmRequestMutex(&RegRec)) 596 607 LIBCLOG_RETURN_INT(-1); 597 608 … … 604 615 * Release mutex. 605 616 */ 606 spmReleaseMutex( );617 spmReleaseMutex(&RegRec); 607 618 LIBCLOG_RETURN_INT(rc); 608 619 } … … 821 832 * @internal 822 833 */ 823 int spmRequestMutex(void)834 static int spmRequestMutex(__LIBC_PSPMXCPTREGREC pRegRec) 824 835 { 825 836 LIBCLOG_ENTER("\n"); … … 829 840 830 841 /* 842 * Install the exception handler. 843 */ 844 FS_SAVE_LOAD(); 845 pRegRec->Core.prev_structure = (void *)~0; 846 pRegRec->Core.ExceptionHandler = spmXcptHandler; 847 DosSetExceptionHandler(&pRegRec->Core); 848 849 /* 831 850 * Check if initatied. 832 851 */ … … 837 856 */ 838 857 if (!spmInit()) 858 { 859 FS_RESTORE(); 839 860 LIBCLOG_RETURN_INT(0); 861 } 862 840 863 LIBC_ASSERTM_FAILED("not initialized!\n"); 864 DosUnsetExceptionHandler(&pRegRec->Core); 865 FS_RESTORE(); 841 866 LIBCLOG_RETURN_INT(-1); 842 867 } 843 868 844 869 /* 845 * Request semaphore. 846 */ 847 FS_SAVE_LOAD(); 870 * Request semaphore and enter "must complete section" to avoid signal trouble. 871 */ 848 872 rc = DosRequestMutexSem(ghmtxSPM, SPM_MUTEX_TIMEOUT); 849 if (rc) 850 { 851 FS_RESTORE(); 873 DosEnterMustComplete(&ul); 874 if (!rc) 875 { 876 if (gcNesting == 0) 877 { 878 gcNesting++; 879 FS_RESTORE(); 880 LIBCLOG_RETURN_INT(0); 881 } 882 LIBC_ASSERTM_FAILED("Nested access to shared memory is not allowed\n"); 883 DosReleaseMutexSem(ghmtxSPM); 884 errno = EBUSY; 885 } 886 else 887 { 852 888 /* @todo recover from owner died. */ 853 889 LIBC_ASSERTM_FAILED("DosRequestMutexSem(%lu) failed with rc=%d!\n", ghmtxSPM, rc); 854 890 _sys_set_errno(rc); 855 LIBCLOG_RETURN_INT(-1); 856 } 857 858 if (gcNesting != 0) 859 { 860 LIBC_ASSERTM_FAILED("Nested access to shared memory is not allowed\n"); 861 DosReleaseMutexSem(ghmtxSPM); 862 FS_RESTORE(); 863 errno = EBUSY; 864 LIBCLOG_RETURN_INT(-1); 865 } 866 gcNesting++; 867 868 /* 869 * Enter a must complete section to avoid some trouble. 870 */ 871 DosEnterMustComplete(&ul); 891 } 892 893 DosUnsetExceptionHandler(&pRegRec->Core); 894 DosExitMustComplete(&ul); 872 895 FS_RESTORE(); 873 LIBCLOG_RETURN_INT( 0);896 LIBCLOG_RETURN_INT(-1); 874 897 } 875 898 … … 879 902 * @internal 880 903 */ 881 int spmReleaseMutex(void)904 static int spmReleaseMutex(__LIBC_PSPMXCPTREGREC pRegRec) 882 905 { 883 906 LIBCLOG_ENTER("\n"); … … 899 922 } 900 923 924 DosUnsetExceptionHandler(&pRegRec->Core); 901 925 DosExitMustComplete(&ul); 902 926 FS_RESTORE(); … … 913 937 * @returns -1 and errno on failure. 914 938 */ 915 int spmInit(void)939 static int spmInit(void) 916 940 { 917 941 LIBCLOG_ENTER("\n"); 918 int rc;919 PPIB pPib;920 PTIB pTib;942 int rc; 943 PPIB pPib; 944 PTIB pTib; 921 945 FS_VAR(); 922 946 … … 933 957 934 958 /* 935 * Get current process id and parent process id. 959 * Get current process id and parent process id 960 * and install the exception handler. 936 961 */ 937 962 DosGetInfoBlocks(&pTib, &pPib); … … 1014 1039 gpSPMHdr->pidCreate = pPib->pib_ulpid; 1015 1040 DosGetDateTime(&gpSPMHdr->dtCreate); 1016 gpSPMHdr->pTcpip = spmAlloc(sizeof( gpSPMHdr->pTcpip));1041 gpSPMHdr->pTcpip = spmAlloc(sizeof(*gpSPMHdr->pTcpip)); 1017 1042 gpSPMHdr->pTcpip->cb = sizeof(*gpSPMHdr->pTcpip); 1018 1043 gpSPMHdr->pTcpip->cSockets = sizeof(gpSPMHdr->pTcpip->acRefs) / sizeof(gpSPMHdr->pTcpip->acRefs[0]); … … 1041 1066 1042 1067 /* failure */ 1043 spmReleaseMutex(); 1068 gcNesting = 0; 1069 DosReleaseMutexSem(ghmtxSPM); 1070 DosExitMustComplete(&ul); 1044 1071 } 1045 1072 … … 1095 1122 1096 1123 /** 1097 * Dereferences a unlinked block.1124 * Dereferences a linked process. 1098 1125 * This means putting it in either the free or zombie list. 1099 1126 * @internal 1100 1127 */ 1101 void spmDereference(__LIBC_PSPMPROCESS pProcess)1128 static void spmZombieOrFree(__LIBC_PSPMPROCESS pProcess) 1102 1129 { 1103 1130 /* … … 1108 1135 pProcess->cReferences--; 1109 1136 1137 /* 1138 * If no more references we'll unlink and free the process. 1139 */ 1110 1140 if (pProcess->cReferences == 0) 1111 1141 spmFreeProcess(pProcess); 1112 else 1113 { 1114 /* 1115 * Mark zombie and put into zombie list. 1116 */ 1142 /* 1143 * If more references, then put it in the zombie list. 1144 */ 1145 else if (pProcess->enmState != __LIBC_PROCSTATE_ZOMBIE) 1146 { 1147 /* unlink. */ 1148 if (pProcess->pNext) 1149 pProcess->pNext->pPrev = pProcess->pPrev; 1150 if (pProcess->pPrev) 1151 pProcess->pPrev->pNext = pProcess->pNext; 1152 else 1153 gpSPMHdr->apHeads[pProcess->enmState] = pProcess->pNext; 1154 1155 /* zombie */ 1117 1156 pProcess->enmState = __LIBC_PROCSTATE_ZOMBIE; 1118 1157 pProcess->pNext = gpSPMHdr->apHeads[__LIBC_PROCSTATE_ZOMBIE]; 1158 if (pProcess->pNext) 1159 pProcess->pNext->pPrev = pProcess; 1160 pProcess->pPrev = NULL; 1119 1161 gpSPMHdr->apHeads[__LIBC_PROCSTATE_ZOMBIE] = pProcess; 1120 1162 } 1163 /* else already zombie */ 1121 1164 } 1122 1165 … … 1130 1173 * @param pidParent Pid of parent process. 1131 1174 */ 1132 __LIBC_PSPMPROCESS spmRegisterSelf(pid_t pid, pid_t pidParent)1175 static __LIBC_PSPMPROCESS spmRegisterSelf(pid_t pid, pid_t pidParent) 1133 1176 { 1134 1177 LIBCLOG_ENTER("pid=%d pidParent=%d\n", pid, pidParent); 1135 1178 __LIBC_PSPMPROCESS pProcess; 1136 __LIBC_PSPMPROCESS pProcessPrev;1137 1179 1138 1180 /* … … 1145 1187 * See if we're in the embryo list. 1146 1188 */ 1147 for (pProcessPrev = NULL, pProcess = gpSPMHdr->apHeads[__LIBC_PROCSTATE_EMBRYO]; pProcess; pProcessPrev = pProcess, pProcess = pProcess->pNext) 1148 { 1189 for (pProcess = gpSPMHdr->apHeads[__LIBC_PROCSTATE_EMBRYO]; pProcess; pProcess = pProcess->pNext) 1190 { 1191 /* sanity */ 1149 1192 LIBC_ASSERTM((uintptr_t)pProcess - (uintptr_t)gpSPMHdr < gpSPMHdr->cb, 1150 "Invalid pointer %p following %p in EMBRYO list\n", (void *)pProcess, (void *)pProcessPrev); 1193 "Invalid pointer %p in EMBRYO list\n", (void *)pProcess); 1194 LIBC_ASSERTM(pProcess->enmState == __LIBC_PROCSTATE_EMBRYO, "Found non embryo process in embryo list! enmState=%d pid=%d\n", 1195 pProcess->enmState, pProcess->pid); 1196 LIBC_ASSERTM(pProcess->cReferences <= 1, "Invalid reference count of a process in the embryo list! cReferences=%d pid=%d\n", 1197 pProcess->cReferences, pProcess->pid); 1198 1199 /* our daddy? */ 1151 1200 if (pProcess->pidParent == pidParent) 1152 1201 { … … 1156 1205 1157 1206 /* link out. */ 1158 if (pProcessPrev) 1159 pProcessPrev->pNext = pProcess->pNext; 1207 if (pProcess->pNext) 1208 pProcess->pNext->pPrev = pProcess->pPrev; 1209 if (pProcess->pPrev) 1210 pProcess->pPrev->pNext = pProcess->pNext; 1160 1211 else 1161 1212 gpSPMHdr->apHeads[__LIBC_PROCSTATE_EMBRYO] = pProcess->pNext; … … 1164 1215 pProcess->enmState = __LIBC_PROCSTATE_ALIVE; 1165 1216 pProcess->pNext = gpSPMHdr->apHeads[__LIBC_PROCSTATE_ALIVE]; 1217 if (pProcess->pNext) 1218 pProcess->pNext->pPrev = pProcess; 1219 pProcess->pPrev = NULL; 1166 1220 gpSPMHdr->apHeads[__LIBC_PROCSTATE_ALIVE] = pProcess; 1167 1221 … … 1171 1225 LIBCLOG_RETURN_P(pProcess); 1172 1226 } 1227 1228 /* more sanity checks. */ 1229 LIBC_ASSERTM(pProcess->pNext != gpSPMHdr->apHeads[__LIBC_PROCSTATE_EMBRYO], "Circular list! pid=%d\n", pProcess->pid); 1230 LIBC_ASSERTM(pProcess->pNext != pProcess, "Circular list with self! pid=%d\n", pProcess->pid); 1231 /* cure insanity... no fix for paranoia? */ 1232 if ( pProcess->pNext == gpSPMHdr->apHeads[__LIBC_PROCSTATE_EMBRYO] 1233 || pProcess->pNext == pProcess) 1234 pProcess->pNext = NULL; 1173 1235 } 1174 1236 … … 1176 1238 * See if we're in the alive list (multiple LIBC versions). 1177 1239 */ 1178 for (pProcessPrev = NULL, pProcess = gpSPMHdr->apHeads[__LIBC_PROCSTATE_ALIVE]; pProcess; pProcessPrev = pProcess, pProcess = pProcess->pNext) 1179 { 1240 for (pProcess = gpSPMHdr->apHeads[__LIBC_PROCSTATE_ALIVE]; pProcess; pProcess = pProcess->pNext) 1241 { 1242 /* (in)santity */ 1180 1243 LIBC_ASSERTM((uintptr_t)pProcess - (uintptr_t)gpSPMHdr < gpSPMHdr->cb, 1181 "Invalid pointer %p following %p in ALIVE list\n", (void *)pProcess, (void *)pProcessPrev); 1244 "Invalid pointer %p in ALIVE list\n", (void *)pProcess); 1245 LIBC_ASSERTM(pProcess->enmState == __LIBC_PROCSTATE_ALIVE, "Found non alive process in alive list! enmState=%d pid=%d\n", 1246 pProcess->enmState, pProcess->pid); 1247 1248 /* is this me? */ 1182 1249 if ( pProcess->pid == pid 1183 1250 && pProcess->pidParent == pidParent) … … 1187 1254 LIBCLOG_RETURN_P(pProcess); 1188 1255 } 1256 1257 /* more sanity */ 1189 1258 LIBC_ASSERTM(pProcess->pid != pid, "Found pid %d with parent %d when searching for that pid but with parent %d\n", 1190 1259 pid, pProcess->pidParent, pidParent); 1260 LIBC_ASSERTM(pProcess->pNext != gpSPMHdr->apHeads[__LIBC_PROCSTATE_ALIVE], "Circular list! pid=%d\n", pProcess->pid); 1261 LIBC_ASSERTM(pProcess->pNext != pProcess, "Circular list with self! pid=%d\n", pProcess->pid); 1262 /* make sane... who's paranoid here... */ 1263 if ( pProcess->pNext == gpSPMHdr->apHeads[__LIBC_PROCSTATE_ALIVE] 1264 || pProcess->pNext == pProcess) 1265 pProcess->pNext = NULL; 1191 1266 } 1192 1267 … … 1200 1275 * Initialize the new process block. 1201 1276 */ 1202 memset(pProcess, 0, gpSPMHdr->cbProcess);1203 1277 pProcess->uVersion = SPM_VERSION; 1204 1278 pProcess->cReferences = 1; … … 1210 1284 /* link into list. */ 1211 1285 pProcess->pNext = gpSPMHdr->apHeads[__LIBC_PROCSTATE_ALIVE]; 1286 if (pProcess->pNext) 1287 pProcess->pNext->pPrev = pProcess; 1288 pProcess->pPrev = NULL; 1212 1289 gpSPMHdr->apHeads[__LIBC_PROCSTATE_ALIVE] = pProcess; 1213 1290 … … 1223 1300 * @internal 1224 1301 */ 1225 __LIBC_PSPMPROCESS spmAllocProcess(void)1302 static __LIBC_PSPMPROCESS spmAllocProcess(void) 1226 1303 { 1227 1304 LIBCLOG_ENTER("\n"); 1228 1305 __LIBC_PSPMPROCESS pProcess = gpSPMHdr->apHeads[__LIBC_PROCSTATE_FREE]; 1229 1306 if (pProcess) 1307 { 1308 if (pProcess->pNext) 1309 pProcess->pNext->pPrev = NULL; 1230 1310 gpSPMHdr->apHeads[__LIBC_PROCSTATE_FREE] = pProcess->pNext; 1311 bzero(pProcess, gpSPMHdr->cbProcess); 1312 } 1231 1313 else 1232 1314 { … … 1235 1317 if (!pProcess) 1236 1318 { 1237 if (gpSPMHdr->apHeads[__LIBC_PROCSTATE_ZOMBIE]) 1238 { 1239 __LIBC_PSPMPROCESS pProcessPrev = NULL; 1240 pProcess = gpSPMHdr->apHeads[__LIBC_PROCSTATE_ZOMBIE]; 1241 while (pProcess->pNext) 1242 { 1243 pProcessPrev = pProcess; 1244 pProcess = pProcess->pNext; 1245 } 1246 if (pProcessPrev) 1247 pProcessPrev->pNext = NULL; 1248 else 1249 gpSPMHdr->apHeads[__LIBC_PROCSTATE_ZOMBIE] = NULL; 1250 } 1251 else 1319 /* 1320 * Hmm. really low on memory, we'll take the oldest zombie if we got any. 1321 */ 1322 if (!gpSPMHdr->apHeads[__LIBC_PROCSTATE_ZOMBIE]) 1252 1323 { 1253 1324 LIBC_ASSERTM_FAILED("shared memory exausted!!!\n"); 1254 LIBCLOG_RETURN_P( pProcess);1325 LIBCLOG_RETURN_P(NULL); 1255 1326 } 1256 } 1257 } 1327 1328 /* unlink last zombie. */ 1329 pProcess = gpSPMHdr->apHeads[__LIBC_PROCSTATE_ZOMBIE]; 1330 while (pProcess->pNext) 1331 pProcess = pProcess->pNext; 1332 if (pProcess->pPrev) 1333 pProcess->pPrev->pNext = NULL; 1334 else 1335 gpSPMHdr->apHeads[__LIBC_PROCSTATE_ZOMBIE] = NULL; 1336 } 1337 bzero(pProcess, gpSPMHdr->cbProcess); 1338 } 1339 1258 1340 LIBCLOG_RETURN_P(pProcess); 1259 1341 } … … 1261 1343 1262 1344 /** 1263 * Frees a given process and it's associated data. 1345 * Unlink and frees a given process and it's associated data. 1346 * 1264 1347 * @internal 1265 1348 */ 1266 void spmFreeProcess(__LIBC_PSPMPROCESS pProcess)1349 static void spmFreeProcess(__LIBC_PSPMPROCESS pProcess) 1267 1350 { 1268 1351 /* … … 1282 1365 1283 1366 /* 1367 * Unlink it. 1368 */ 1369 if (pProcess->pNext) 1370 pProcess->pNext->pPrev = pProcess->pPrev; 1371 if (pProcess->pPrev) 1372 pProcess->pPrev->pNext = pProcess->pNext; 1373 else 1374 gpSPMHdr->apHeads[pProcess->enmState] = pProcess->pNext; 1375 1376 /* 1284 1377 * Mark free and put in the free list. 1285 1378 */ 1286 1379 pProcess->enmState = __LIBC_PROCSTATE_FREE; 1287 1380 pProcess->pNext = gpSPMHdr->apHeads[__LIBC_PROCSTATE_FREE]; 1381 if (pProcess->pNext) 1382 pProcess->pNext->pPrev = pProcess; 1383 pProcess->pPrev = NULL; 1288 1384 gpSPMHdr->apHeads[__LIBC_PROCSTATE_FREE] = pProcess; 1289 1385 } … … 1298 1394 * @internal 1299 1395 */ 1300 void * spmAlloc(size_t cbSize) 1301 { 1302 LIBCLOG_ENTER("cbAlloc=%d\n", cbSize); 1303 __LIBC_PSPMPOOLCHUNKFREE pFree; 1304 void *pvRet; 1396 static void * spmAlloc(size_t cbSize) 1397 { 1398 LIBCLOG_ENTER("cbSize=%d\n", cbSize); 1399 void *pv; 1305 1400 1306 1401 /* … … 1318 1413 else 1319 1414 cbSize = SPM_POOL_ALIGN(cbSize); 1415 1416 /* 1417 * Attempt an allocation. 1418 */ 1419 pv = spmAllocSub(cbSize); 1420 if (!pv) 1421 { 1422 __LIBC_PSPMPROCESS pProcess; 1423 /* 1424 * Free up free processes. 1425 */ 1426 while ((pProcess = gpSPMHdr->apHeads[__LIBC_PROCSTATE_FREE]) != NULL) 1427 { 1428 if (pProcess->pNext) 1429 pProcess->pNext->pPrev = NULL; 1430 pProcess->pNext = NULL; 1431 pProcess->pPrev = NULL; 1432 pProcess->enmState = ~0; 1433 spmFree(pProcess); 1434 } 1435 1436 /* 1437 * Free up inherit data. 1438 */ 1439 for (pProcess = gpSPMHdr->apHeads[__LIBC_PROCSTATE_ALIVE]; pProcess; pProcess = pProcess->pNext) 1440 if (pProcess->pInherit) 1441 { 1442 void *pv = pProcess->pInherit; 1443 pProcess->pInherit = NULL; 1444 spmFree(pv); 1445 } 1446 1447 /* 1448 * Free embryos which are more than a minutte old. 1449 */ 1450 /** @todo */ 1451 1452 /* 1453 * Retry allocation. 1454 */ 1455 pv = spmAllocSub(cbSize); 1456 } 1457 1458 LIBCLOG_RETURN_P(pv); 1459 } 1460 1461 /** 1462 * Allocate memory in SPM pool of given size. 1463 * The size is aligned and checked by the caller. 1464 * 1465 * @returns address of memory on success. 1466 * @returns NULL on failure. 1467 * @param cbSize Size of memory to allocate. 1468 * @internal 1469 */ 1470 static void *spmAllocSub(size_t cbSize) 1471 { 1472 LIBCLOG_ENTER("cbSize=%d\n", cbSize); 1473 __LIBC_PSPMPOOLCHUNKFREE pFree; 1474 void *pvRet; 1320 1475 1321 1476 /* … … 1338 1493 while (pFree) 1339 1494 { 1495 SPM_ASSERT_PTR_NULL(pFree->pNext); 1496 SPM_ASSERT_PTR_NULL(pFree->pPrev); 1497 SPM_ASSERT_PTR_NULL(pFree->core.pNext); 1498 SPM_ASSERT_PTR_NULL(pFree->core.pPrev); 1340 1499 if (pFree->cb >= cbSize) 1341 1500 { … … 1346 1505 { 1347 1506 /* create the new pool free chunk at end unlinking pFree in the process. */ 1348 __LIBC_PSPMPOOLCHUNKFREE pNew = (__LIBC_PSPMPOOLCHUNKFREE)((char *)pFree + cbSize + sizeof(__LIBC_SPMPOOLCHUNK)); 1507 __LIBC_PSPMPOOLCHUNKFREE pNew = (__LIBC_PSPMPOOLCHUNKFREE)((char *)(&pFree->core + 1) + cbSize); 1508 SPM_ASSERT_PTR_NULL(pNew); 1349 1509 pNew->core.pPrev = &pFree->core; 1350 1510 pNew->core.pNext = pFree->core.pNext; … … 1354 1514 else 1355 1515 gpSPMHdr->pPoolTail = &pNew->core; 1516 SPM_ASSERT_PTR_NULL(pNew->core.pNext); 1517 SPM_ASSERT_PTR_NULL(pNew->core.pPrev); 1518 SPM_ASSERT_PTR_NULL(pFree->core.pNext); 1519 SPM_ASSERT_PTR_NULL(pFree->core.pPrev); 1356 1520 1357 1521 pNew->cb = pFree->cb - ((uintptr_t)pNew - (uintptr_t)pFree); … … 1398 1562 while (pFree) 1399 1563 { 1564 SPM_ASSERT_PTR_NULL(pFree->pNext); 1565 SPM_ASSERT_PTR_NULL(pFree->pPrev); 1566 SPM_ASSERT_PTR_NULL(pFree->core.pNext); 1567 SPM_ASSERT_PTR_NULL(pFree->core.pPrev); 1400 1568 if (pFree->cb >= cbSize) 1401 1569 { … … 1455 1623 * @internal 1456 1624 */ 1457 int spmFree(void *pv)1625 static int spmFree(void *pv) 1458 1626 { 1459 1627 LIBCLOG_ENTER("pv=%p\n", pv); 1460 1628 __LIBC_PSPMPOOLCHUNKFREE pFree; 1461 __LIBC_PSPMPOOLCHUNKFREE pCur; 1629 __LIBC_PSPMPOOLCHUNKFREE pLeft; 1630 __LIBC_PSPMPOOLCHUNKFREE pRight; 1462 1631 1463 1632 /* … … 1466 1635 if (!pv) 1467 1636 LIBCLOG_RETURN_INT(0); 1468 if ( (uintptr_t)pv - (uintptr_t)gpSPMHdr->pPoolHead >= gpSPMHdr->cb 1469 || SPM_POOL_ALIGN((uintptr_t)pv) != (uintptr_t)pv) 1637 if (!SPM_VALID_PTR(pv) || SPM_POOL_ALIGN((uintptr_t)pv) != (uintptr_t)pv) 1470 1638 { 1471 1639 LIBC_ASSERTM_FAILED("Invalid pointer %p\n", pv); … … 1483 1651 */ 1484 1652 pFree = (__LIBC_PSPMPOOLCHUNKFREE)((__LIBC_PSPMPOOLCHUNK)pv - 1); 1485 pCur = gpSPMHdr->pPoolFreeTail; 1486 while (pFree < pCur) 1487 pCur = pCur->pPrev; 1488 /* (pCur is the node before pFree) */ 1489 1490 if (pCur == pFree) 1653 SPM_ASSERT_PTR_NULL(pFree->core.pNext); 1654 SPM_ASSERT_PTR_NULL(pFree->core.pPrev); 1655 pLeft = gpSPMHdr->pPoolFreeTail; 1656 while (pFree < pLeft) 1657 { 1658 SPM_ASSERT_PTR_NULL(pLeft); 1659 SPM_ASSERT_PTR_NULL(pLeft->pNext); 1660 pLeft = pLeft->pPrev; 1661 } 1662 /* (pLeft is the node before pFree) */ 1663 SPM_ASSERT_PTR_NULL(pLeft); 1664 1665 if (pLeft == pFree) 1491 1666 { 1492 1667 LIBC_ASSERTM_FAILED("Freed twice! pv=%pv\n", pv); … … 1495 1670 } 1496 1671 1497 if (!p Cur)1672 if (!pLeft) 1498 1673 { /* we're head free chunk. */ 1499 1674 pFree->pPrev = NULL; 1500 pCur = pFree->pNext = gpSPMHdr->pPoolFreeHead; 1675 pRight = pFree->pNext = gpSPMHdr->pPoolFreeHead; 1676 if (pRight) 1677 pRight->pPrev = pFree; 1501 1678 gpSPMHdr->pPoolFreeHead = pFree; 1502 1679 } 1503 else if (pCur->core.pNext == pFree->core.pPrev) 1504 { /* merge with left free chunk. */ 1505 pCur->core.pNext = pFree->core.pNext; 1506 if (pCur->core.pNext) 1507 pCur->core.pNext->pPrev = &pCur->core; 1680 else 1681 { 1682 SPM_ASSERT_PTR_NULL(pLeft->pNext); 1683 SPM_ASSERT_PTR_NULL(pLeft->pPrev); 1684 SPM_ASSERT_PTR_NULL(pLeft->core.pNext); 1685 SPM_ASSERT_PTR_NULL(pLeft->core.pPrev); 1686 1687 if (pLeft->core.pNext == pFree->core.pPrev) 1688 { /* merge with left free chunk. */ 1689 pLeft->core.pNext = pFree->core.pNext; 1690 if (pLeft->core.pNext) 1691 pLeft->core.pNext->pPrev = &pLeft->core; 1692 else 1693 gpSPMHdr->pPoolTail = &pLeft->core; 1694 gpSPMHdr->cbFree -= pLeft->cb; 1695 pFree = pLeft; 1696 pRight = pLeft->pNext; 1697 } 1508 1698 else 1509 gpSPMHdr->pPoolHead = &pCur->core; 1510 gpSPMHdr->cbFree -= pCur->cb; 1511 pFree = pCur; 1512 pCur = pCur->pNext; 1513 } 1514 else 1515 { /* link into the free list then. */ 1516 pFree->pPrev = pCur; 1517 pFree->pNext = pCur->pNext; 1518 pCur->pNext = pFree; 1519 if (pFree->pNext) 1520 pFree->pNext->pPrev = pFree; 1521 else 1522 gpSPMHdr->pPoolFreeTail = pFree; 1523 pCur = pFree->pNext; 1699 { /* link into the free list then. */ 1700 pFree->pPrev = pLeft; 1701 pFree->pNext = pLeft->pNext; 1702 pLeft->pNext = pFree; 1703 if (pFree->pNext) 1704 pFree->pNext->pPrev = pFree; 1705 else 1706 gpSPMHdr->pPoolFreeTail = pFree; 1707 pRight = pFree->pNext; 1708 } 1524 1709 } 1525 1710 1526 1711 /* Check if we can merge with right hand free chunk. */ 1527 if (p Cur && pCur->core.pPrev == pFree->core.pNext)1528 { /* merge with left free chunk. */1529 pFree->core.pNext = p Cur->core.pNext;1712 if (pRight && pRight->core.pPrev == pFree->core.pNext) 1713 { /* merge with right free chunk. */ 1714 pFree->core.pNext = pRight->core.pNext; 1530 1715 if (pFree->core.pNext) 1531 1716 pFree->core.pNext->pPrev = &pFree->core; … … 1533 1718 gpSPMHdr->pPoolTail = &pFree->core; 1534 1719 1535 pFree->pNext = p Cur->pNext;1720 pFree->pNext = pRight->pNext; 1536 1721 if (pFree->pNext) 1537 1722 pFree->pNext->pPrev = pFree; 1538 1723 else 1539 1724 gpSPMHdr->pPoolFreeTail = pFree; 1540 gpSPMHdr->cbFree -= p Cur->cb;1725 gpSPMHdr->cbFree -= pRight->cb; 1541 1726 } 1542 1727 … … 1545 1730 gpSPMHdr->cbFree += pFree->cb; 1546 1731 1732 SPM_ASSERT_PTR_NULL(pFree->pNext); 1733 SPM_ASSERT_PTR_NULL(pFree->pPrev); 1734 SPM_ASSERT_PTR_NULL(pFree->core.pNext); 1735 SPM_ASSERT_PTR_NULL(pFree->core.pPrev); 1736 1547 1737 LIBCLOG_RETURN_INT(0); 1548 1738 } 1549 1739 1740 1741 1742 1743 /** 1744 * Exception handle use while owning the SPM data. 1745 * 1746 * @returns See cpref. 1747 * @param pRepRec Exception report. See cpref for details. 1748 * @param pRegRec Pointer to our __LIBC_SPMXCPTREGREC structure. 1749 * @param pCtx CPU context. See cpref for details. 1750 * @param pvWhatever Nobody knows. 1751 */ 1752 static ULONG _System spmXcptHandler(PEXCEPTIONREPORTRECORD pRepRec, PEXCEPTIONREGISTRATIONRECORD pRegRec, PCONTEXTRECORD pCtx, PVOID pvWhatever) 1753 { 1754 PPIB pPib = NULL; 1755 PTIB pTib = NULL; 1756 PID pid; 1757 TID tid; 1758 ULONG cNesting; 1759 int rc; 1760 1761 LIBCLOG_MSG2("!!! SPM: num %08lx flags %08lx nested %p whatever %p\n", 1762 pRepRec->ExceptionNum, pRepRec->fHandlerFlags, 1763 (void *)pRepRec->NestedExceptionReportRecord, pvWhatever); 1764 /* 1765 * Skip unwinding exceptions. 1766 */ 1767 if (pRepRec->fHandlerFlags & (EH_UNWINDING | EH_EXIT_UNWIND)) 1768 return XCPT_CONTINUE_SEARCH; 1769 1770 /* 1771 * Switch out and see what went wrong. 1772 */ 1773 switch (pRepRec->ExceptionNum) 1774 { 1775 /* 1776 * This isn't wrong just unlikely and must be ignored! 1777 */ 1778 case XCPT_ASYNC_PROCESS_TERMINATE: 1779 case XCPT_PROCESS_TERMINATE: 1780 case XCPT_SIGNAL: 1781 { 1782 PPIB pPib; 1783 PTIB pTib; 1784 PID pid; 1785 TID tid; 1786 ULONG cNesting; 1787 int rc; 1788 DosGetInfoBlocks(&pTib, &pPib); 1789 rc = DosQueryMutexSem(ghmtxSPM, &pid, &tid, &cNesting); 1790 if (!rc && pPib->pib_ulpid == pid && pTib->tib_ptib2->tib2_ultid == tid) 1791 return XCPT_CONTINUE_EXECUTION; 1792 return XCPT_CONTINUE_SEARCH; 1793 } 1794 1795 /* 1796 * This is serious stuff. 1797 */ 1798 case XCPT_ACCESS_VIOLATION: 1799 { 1800 const char *psz = "???"; 1801 switch (pRepRec->ExceptionInfo[0]) 1802 { 1803 case XCPT_WRITE_ACCESS: psz = "Write"; break; 1804 case XCPT_READ_ACCESS: psz = "Read"; break; 1805 case XCPT_EXECUTE_ACCESS: psz = "Exec"; break; 1806 case XCPT_UNKNOWN_ACCESS: psz = "Unknown"; break; 1807 } 1808 LIBCLOG_REL("SPM Exception! Access violation. %s access. Address=%lx (info[1]).\n", 1809 psz, pRepRec->ExceptionInfo[1]); 1810 break; 1811 } 1812 1813 case XCPT_INTEGER_DIVIDE_BY_ZERO: 1814 LIBCLOG_REL("SPM Exception! divide by zero.\n"); 1815 break; 1816 1817 case XCPT_BREAKPOINT: 1818 LIBCLOG_REL("SPM Exception! breakpoint (assertion).\n"); 1819 break; 1820 1821 default: 1822 return XCPT_CONTINUE_SEARCH; 1823 } 1824 1825 /* 1826 * Write context. 1827 */ 1828 LIBCLOG_REL("SPM Exception! cs:eip=%04lx:%08lx ss:esp=%04lx:%08lx\n", 1829 pCtx->ctx_SegCs, pCtx->ctx_RegEip, pCtx->ctx_SegSs, pCtx->ctx_RegEsp); 1830 LIBCLOG_REL("SPM Exception! eax=%08lx ebx=%08lx ecx=%08lx edx=%08lx\n", 1831 pCtx->ctx_RegEax, pCtx->ctx_RegEbx, pCtx->ctx_RegEcx, pCtx->ctx_RegEdx); 1832 LIBCLOG_REL("SPM Exception! edi=%08lx edi=%08lx ebp=%08lx efl=%08lx\n", 1833 pCtx->ctx_RegEdi, pCtx->ctx_RegEsi, pCtx->ctx_RegEbp, pCtx->ctx_EFlags); 1834 LIBCLOG_REL("SPM Exception! ds=%04lx es=%04lx fs=%04lx gs=%04lx\n", 1835 pCtx->ctx_SegDs, pCtx->ctx_SegEs, pCtx->ctx_SegFs, pCtx->ctx_SegGs); 1836 1837 /* 1838 * Check up on the semaphore. 1839 */ 1840 DosGetInfoBlocks(&pTib, &pPib); 1841 rc = DosQueryMutexSem(ghmtxSPM, &pid, &tid, &cNesting); 1842 if (!rc && pPib->pib_ulpid == pid && pTib->tib_ptib2->tib2_ultid == tid) 1843 LIBCLOG_REL("SPM Exception! Owner of the mutex!\n"); 1844 else 1845 LIBCLOG_REL("SPM Exception! Not owner of the mutex! owner: tid=%ld pid=%ld cNesting=%ld\n", tid, pid, cNesting); 1846 1847 /* 1848 * Dump the memory. 1849 */ 1850 spmCheck(0, 1); 1851 1852 #ifdef DEBUG 1853 /* 1854 * Remove the exception handler and die. 1855 */ 1856 pRegRec->prev_structure = (void *)~0; 1857 DosUnsetExceptionHandler(pRegRec); 1858 __asm__("int $3\n"); 1859 spmCheck(1, 1); 1860 #endif 1861 return XCPT_CONTINUE_SEARCH; 1862 } 1863 1864 1865 /** 1866 * Checks and dumps the SPM memory. 1867 */ 1868 static int spmCheck(int fBreakpoint, int fVerbose) 1869 { 1870 int i; 1871 int cErrors = 0; 1872 __LIBC_PSPMPOOLCHUNK pChunk; 1873 __LIBC_PSPMPOOLCHUNK pChunkPrev; 1874 __LIBC_PSPMPOOLCHUNKFREE pFree; 1875 __LIBC_PSPMPOOLCHUNKFREE pFreePrev; 1876 size_t cbTotal; 1877 size_t cbOverhead; 1878 1879 1880 #define CHECK_LOG(...) \ 1881 do { if (fVerbose) LIBCLOG_REL(__VA_ARGS__); } while (0) 1882 #define CHECK_FAILED(...) \ 1883 do { CHECK_LOG(__VA_ARGS__); if (fBreakpoint) __asm__ __volatile__("int3\n"); cErrors++; } while (0) 1884 #define CHECK_PTR(ptr, msg) \ 1885 do { if (!SPM_VALID_PTR(ptr)) { CHECK_FAILED("Invalid pointer %p (%s). %s\n", (void *)ptr, #ptr, msg); } } while (0) 1886 #define CHECK_PTR_NULL(ptr, msg) \ 1887 do { if (!SPM_VALID_PTR_NULL(ptr)) { CHECK_FAILED("Invalid pointer %p (%s). %s\n", (void *)ptr, #ptr, msg); } } while (0) 1888 1889 1890 /* 1891 * Header. 1892 */ 1893 CHECK_LOG("\n" 1894 "SPM Dump\n" 1895 "========\n" 1896 "\n" 1897 "uVersion %#x\n" 1898 "cb %#x\n" 1899 "cbFree %#x\n" 1900 "pPoolHead %p\n" 1901 "pPoolTail %p\n" 1902 "pPoolFreeHead %p\n" 1903 "pPoolFreeTail %p\n" 1904 "cbProcess %d\n" 1905 , 1906 gpSPMHdr->uVersion, 1907 gpSPMHdr->cb, 1908 gpSPMHdr->cbFree, 1909 (void *)gpSPMHdr->pPoolHead, 1910 (void *)gpSPMHdr->pPoolTail, 1911 (void *)gpSPMHdr->pPoolFreeHead, 1912 (void *)gpSPMHdr->pPoolFreeTail, 1913 gpSPMHdr->cbProcess); 1914 for (i = 0; i < __LIBC_PROCSTATE_MAX; i++) 1915 CHECK_LOG("apHeads[%d] %p\n", i, (void *)gpSPMHdr->apHeads[i]); 1916 CHECK_LOG("pTcpip %p\n" 1917 "pidCreate %#x (%d)\n" 1918 "dtCreate %04d-%02d-%02d %02d:%02d:%02d.%02d\n", 1919 (void *)gpSPMHdr->pTcpip, 1920 gpSPMHdr->pidCreate, gpSPMHdr->pidCreate, 1921 gpSPMHdr->dtCreate.year, 1922 gpSPMHdr->dtCreate.month, 1923 gpSPMHdr->dtCreate.day, 1924 gpSPMHdr->dtCreate.hours, 1925 gpSPMHdr->dtCreate.minutes, 1926 gpSPMHdr->dtCreate.seconds, 1927 gpSPMHdr->dtCreate.hundredths); 1928 1929 /* 1930 * Validate the header. 1931 */ 1932 CHECK_PTR(gpSPMHdr->pPoolHead, ""); 1933 CHECK_PTR(gpSPMHdr->pPoolTail, ""); 1934 CHECK_PTR_NULL(gpSPMHdr->pPoolFreeHead, ""); 1935 CHECK_PTR_NULL(gpSPMHdr->pPoolFreeTail, ""); 1936 CHECK_PTR_NULL(gpSPMHdr->pTcpip, ""); 1937 1938 /* 1939 * Validate the lists. 1940 */ 1941 for (i = 0; i < __LIBC_PROCSTATE_MAX; i++) 1942 { 1943 __LIBC_PSPMPROCESS pProcess; 1944 __LIBC_PSPMPROCESS pProcessLast; 1945 char sz[64]; 1946 sprintf(sz, "i=%d\n", i); 1947 CHECK_PTR_NULL(gpSPMHdr->apHeads[i], sz); 1948 1949 /* check head backpointer. */ 1950 if (SPM_VALID_PTR(gpSPMHdr->apHeads[i]) && gpSPMHdr->apHeads[i]->pPrev) 1951 CHECK_FAILED("Invalid list head in list %i. pPrev != NULL. pPrev=%p pProcess=%p pid=%#06x\n", 1952 i, (void *)gpSPMHdr->apHeads[i]->pPrev, (void *)gpSPMHdr->apHeads[i], gpSPMHdr->apHeads[i]->pid); 1953 1954 /* validate the list. */ 1955 pProcessLast = NULL; 1956 pProcess = gpSPMHdr->apHeads[i]; 1957 while (pProcess) 1958 { 1959 CHECK_PTR(pProcess, sz); 1960 if (!SPM_VALID_PTR(pProcess)) 1961 break; 1962 CHECK_LOG("pProcess=%08x enmState=%d cReferences=%d pid=%#06x pidParent=%#06x pInherit=%08x cSPMOpens=%d pNext=%08x pPrev=%08x\n", 1963 (uintptr_t)pProcess, pProcess->enmState, pProcess->cReferences, pProcess->pid, pProcess->pidParent, 1964 (uintptr_t)pProcess->pInherit, pProcess->cSPMOpens, (uintptr_t)pProcess->pNext, (uintptr_t)pProcess->pPrev); 1965 1966 sprintf(sz, "i=%d pid=%#06x\n", i, pProcess->pid); 1967 CHECK_PTR_NULL(pProcess->pInherit, sz); 1968 CHECK_PTR_NULL(pProcess->pNext, sz); 1969 CHECK_PTR_NULL(pProcess->pPrev, sz); 1970 if (pProcess->enmState != i) 1971 CHECK_FAILED("Invalid state! enmState=%d i=%d\n", 1972 pProcess->enmState, i); 1973 if (pProcess->pPrev != pProcessLast) 1974 CHECK_FAILED("Invalid back pointer! pPrev=%p pProcessLast=%p\n", 1975 (void *)pProcess->pPrev, (void *)pProcessLast); 1976 if (pProcess->pPrev == pProcess) 1977 CHECK_FAILED("Cylic back pointer! pPrev=%p pProcessLast=%p pProcess=%p\n", 1978 (void *)pProcess->pPrev, (void *)pProcessLast, (void *)pProcess); 1979 if (pProcess->pNext == pProcess) 1980 CHECK_FAILED("Cylic next pointer! pNext=%p pProcessLast=%p pProcess=%p\n", 1981 (void *)pProcess->pNext, (void *)pProcessLast, (void *)pProcess); 1982 if (pProcess->pNext == gpSPMHdr->apHeads[i]) 1983 CHECK_FAILED("Cylic next pointer (to head)! pNext=%p pHead=%p pProcess=%p\n", 1984 (void *)pProcess->pNext, (void *)gpSPMHdr->apHeads[i], (void *)pProcess); 1985 if (pProcess->pPrev == pProcess->pNext && pProcess->pNext) 1986 CHECK_FAILED("Cylic back & next pointers! pPrev=%p pNext=%p pProcessLast=%p pProcess=%p\n", 1987 (void *)pProcess->pPrev, (void *)pProcess->pNext, (void *)pProcessLast, (void *)pProcess); 1988 1989 /* next */ 1990 if ( pProcess->pNext == pProcess 1991 || (pProcess->pPrev == pProcess->pNext && pProcess->pNext) 1992 || pProcess->pNext == gpSPMHdr->apHeads[i]) 1993 break; 1994 pProcessLast = pProcess; 1995 pProcess = pProcess->pNext; 1996 } 1997 } 1998 1999 /* 2000 * Validate the heap free list. 2001 */ 2002 cbTotal = 0; 2003 cbOverhead = 0; 2004 pFreePrev = NULL; 2005 pFree = gpSPMHdr->pPoolFreeHead; 2006 while (pFree) 2007 { 2008 size_t cb; 2009 char szMsg[64]; 2010 CHECK_PTR(pFree, ""); 2011 if (!SPM_VALID_PTR(pFree)) 2012 break; 2013 CHECK_LOG("pFree=%08x pNext=%08x pPrev=%08x cb=%08x Core.pNext=%08x Core.pPrev=%08x\n", 2014 (uintptr_t)pFree, (uintptr_t)pFree->pNext, (uintptr_t)pFree->pPrev, pFree->cb, 2015 (uintptr_t)pFree->core.pNext, (uintptr_t)pFree->core.pPrev); 2016 sprintf(szMsg, "pFree=%p\n", pFree); 2017 CHECK_PTR_NULL(pFree->pNext, szMsg); 2018 CHECK_PTR_NULL(pFree->pPrev, szMsg); 2019 CHECK_PTR_NULL(pFree->core.pNext, szMsg); 2020 CHECK_PTR_NULL(pFree->core.pPrev, szMsg); 2021 if (pFree->pPrev != pFreePrev) 2022 CHECK_FAILED("Invalid back pointer! pFree=%p pPrev=%p pFreePrev=%p\n", (void *)pFree, (void *)pFree->pPrev, (void *)pFreePrev); 2023 if (pFree->pPrev == pFree) 2024 CHECK_FAILED("Cyclic back pointer! pFree=%p pPrev=%p pFreePrev=%p\n", (void *)pFree, (void *)pFree->pPrev, (void *)pFreePrev); 2025 if (pFree->pNext == pFree) 2026 CHECK_FAILED("Cyclic next pointer! pFree=%p pNext=%p pFreePrev=%p\n", (void *)pFree, (void *)pFree->pNext, (void *)pFreePrev); 2027 if (pFree->pNext == pFree->pPrev && pFree->pNext) 2028 CHECK_FAILED("Cyclic next & back pointer! pFree=%p pNext=%p pPrev=%p pFreePrev=%p\n", 2029 (void *)pFree, (void *)pFree->pNext, (void *)pFree->pNext, (void *)pFreePrev); 2030 if (pFree->pNext == gpSPMHdr->pPoolFreeHead) 2031 CHECK_FAILED("Cyclic next pointer (to head)! pFree=%p pNext=%p pFreePrev=%p pHead=%p\n", 2032 (void *)pFree, (void *)pFree->pNext, (void *)pFreePrev, (void *)gpSPMHdr->pPoolFreeHead); 2033 if (!pFree->pNext && gpSPMHdr->pPoolFreeTail != pFree) 2034 CHECK_FAILED("Invalid tail pointer! pFree=%p pHead=%p pTail=%p\n", 2035 (void *)pFree, (void *)gpSPMHdr->pPoolFreeHead, (void *)gpSPMHdr->pPoolFreeTail); 2036 if (pFreePrev > pFree) 2037 CHECK_FAILED("Invalid storting! pFree=%p pFreePrev=%p\n", (void *)pFree, (void *)pFreePrev); 2038 2039 if (pFree->core.pNext) 2040 cb = (uintptr_t)pFree->core.pNext - (uintptr_t)(&pFree->core + 1); 2041 else 2042 cb = (uintptr_t)gpSPMHdr + gpSPMHdr->cb - (uintptr_t)(&pFree->core + 1); 2043 if (pFree->cb != cb) 2044 CHECK_FAILED("Invalid size of free block %p. Claimed %d, actual %d\n", (void *)pFree, pFree->cb, cb); 2045 2046 /* next */ 2047 if ( pFree->pNext == pFree 2048 || (pFree->pNext == pFree->pPrev && pFree->pNext) 2049 || pFree->pNext == gpSPMHdr->pPoolFreeHead) 2050 break; 2051 cbTotal += pFree->cb; 2052 cbOverhead += sizeof(pFree->core); 2053 pFreePrev = pFree; 2054 pFree = pFree->pNext; 2055 } 2056 2057 CHECK_LOG("Free: cbTotal=%d cbOverhead=%d (core); cbFree=%d cb=%d\n", cbTotal, cbOverhead, gpSPMHdr->cbFree, gpSPMHdr->cb); 2058 if (cbTotal != gpSPMHdr->cbFree) 2059 CHECK_FAILED("Free memory count is bad. cbFree=%d in free list %d\n", gpSPMHdr->cbFree, cbTotal); 2060 2061 2062 /* 2063 * Validate the heap free list. 2064 */ 2065 cbTotal = 0; 2066 cbOverhead = 0; 2067 pChunkPrev = NULL; 2068 pChunk = gpSPMHdr->pPoolHead; 2069 while (pChunk) 2070 { 2071 char szMsg[64]; 2072 CHECK_PTR(pChunk, ""); 2073 if (!SPM_VALID_PTR(pChunk)) 2074 break; 2075 CHECK_LOG("pChunk=%08x pNext=%08x pPrev=%08x\n", 2076 (uintptr_t)pChunk, (uintptr_t)pChunk->pNext, (uintptr_t)pChunk->pPrev); 2077 sprintf(szMsg, "pChunk=%p\n", pChunk); 2078 CHECK_PTR_NULL(pChunk->pNext, szMsg); 2079 CHECK_PTR_NULL(pChunk->pPrev, szMsg); 2080 if (pChunk->pPrev != pChunkPrev) 2081 CHECK_FAILED("Invalid back pointer! pChunk=%p pPrev=%p pChunkPrev=%p\n", (void *)pChunk, (void *)pChunk->pPrev, (void *)pChunkPrev); 2082 if (pChunk->pPrev == pChunk) 2083 CHECK_FAILED("Cyclic back pointer! pChunk=%p pPrev=%p pChunkPrev=%p\n", (void *)pChunk, (void *)pChunk->pPrev, (void *)pChunkPrev); 2084 if (pChunk->pNext == pChunk) 2085 CHECK_FAILED("Cyclic next pointer! pChunk=%p pNext=%p pChunkPrev=%p\n", (void *)pChunk, (void *)pChunk->pNext, (void *)pChunkPrev); 2086 if (pChunk->pNext == pChunk->pPrev && pChunk->pNext) 2087 CHECK_FAILED("Cyclic next & back pointer! pChunk=%p pNext=%p pPrev=%p pChunkPrev=%p\n", 2088 (void *)pChunk, (void *)pChunk->pNext, (void *)pChunk->pNext, (void *)pChunkPrev); 2089 if (pChunk->pNext == gpSPMHdr->pPoolHead) 2090 CHECK_FAILED("Cyclic next pointer (to head)! pChunk=%p pNext=%p pChunkPrev=%p pHead=%p\n", 2091 (void *)pChunk, (void *)pChunk->pNext, (void *)pChunkPrev, (void *)gpSPMHdr->pPoolHead); 2092 if (!pChunk->pNext && gpSPMHdr->pPoolTail != pChunk) 2093 CHECK_FAILED("Invalid tail pointer! pChunk=%p pHead=%p pTail=%p\n", 2094 (void *)pChunk, (void *)gpSPMHdr->pPoolHead, (void *)gpSPMHdr->pPoolTail); 2095 if (pChunkPrev > pChunk) 2096 CHECK_FAILED("Invalid storting! pChunk=%p pChunkPrev=%p\n", (void *)pChunk, (void *)pChunkPrev); 2097 2098 /* next */ 2099 if ( pChunk->pNext == pChunk 2100 || (pChunk->pNext == pChunk->pPrev && pChunk->pNext) 2101 || pChunk->pNext == gpSPMHdr->pPoolHead) 2102 break; 2103 if (pChunk->pNext) 2104 cbTotal += (uintptr_t)pChunk->pNext - (uintptr_t)(pChunk + 1); 2105 else 2106 cbTotal += (uintptr_t)gpSPMHdr + gpSPMHdr->cb - (uintptr_t)(pChunk + 1); 2107 cbOverhead += sizeof(*pChunk); 2108 pChunkPrev = pChunk; 2109 pChunk = pChunk->pNext; 2110 } 2111 2112 CHECK_LOG("Memory: cbTotal=%d cbOverhead=%d gpSPMHdr->cb=%d\n", cbTotal, cbOverhead, gpSPMHdr->cb); 2113 if (cbTotal + cbOverhead != gpSPMHdr->cb - gpSPMHdr->cbProcess) 2114 CHECK_FAILED("Memory accouting count is bad. Found %d expected %d ; cbTotal=%d cbOverhead=%d gpSPMHdr->cb=%d\n", 2115 cbTotal + cbOverhead, gpSPMHdr->cb - gpSPMHdr->cbProcess, cbTotal, cbOverhead, gpSPMHdr->cb); 2116 2117 CHECK_LOG("spmCheck returns cErrors=%d\n", cErrors); 2118 return cErrors; 2119 } 2120 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/sys/tcpipver.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r1456 r1457 76 76 #define MY_FD_SET(fd, set) FD_SET(fd, set) 77 77 #define MY_FD_ISSET(fd, set) FD_ISSET(fd, set) 78 #define MY_FD_ZERO(set, cb) memset(set, 0, cb);78 #define MY_FD_ZERO(set, cb) bzero(set, cb); 79 79 #define my_fd_set fd_set 80 80 … … 83 83 #define MY_FD_SET(fd, set) V5_FD_SET(fd, set) 84 84 #define MY_FD_ISSET(fd, set) V5_FD_ISSET(fd, set) 85 #define MY_FD_ZERO(set, cb) memset(set, 0, cb);85 #define MY_FD_ZERO(set, cb) bzero(set, cb); 86 86 #define my_fd_set v5_fd_set 87 87 … … 1055 1055 cb = (nfds + 7) / 8; 1056 1056 if (readfds) 1057 memset(readfds, 0, cb);1057 bzero(readfds, cb); 1058 1058 if (writefds) 1059 memset(writefds, 0, cb);1059 bzero(writefds, cb); 1060 1060 if (exceptfds) 1061 memset(exceptfds, 0, cb);1061 bzero(exceptfds, cb); 1062 1062 LIBCLOG_RETURN_INT(0); 1063 1063 } -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.