@@ -330,6 +330,55 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
330
330
let result = this. pthread_rwlock_destroy ( rwlock) ?;
331
331
this. write_scalar ( Scalar :: from_i32 ( result) , dest) ?;
332
332
}
333
+ "pthread_condattr_init" => {
334
+ let & [ attr] = check_arg_count ( args) ?;
335
+ let result = this. pthread_condattr_init ( attr) ?;
336
+ this. write_scalar ( Scalar :: from_i32 ( result) , dest) ?;
337
+ }
338
+ "pthread_condattr_setclock" => {
339
+ let & [ attr, clock_id] = check_arg_count ( args) ?;
340
+ let result = this. pthread_condattr_setclock ( attr, clock_id) ?;
341
+ this. write_scalar ( Scalar :: from_i32 ( result) , dest) ?;
342
+ }
343
+ "pthread_condattr_getclock" => {
344
+ let & [ attr, clock_id] = check_arg_count ( args) ?;
345
+ let result = this. pthread_condattr_getclock ( attr, clock_id) ?;
346
+ this. write_scalar ( Scalar :: from_i32 ( result) , dest) ?;
347
+ }
348
+ "pthread_condattr_destroy" => {
349
+ let & [ attr] = check_arg_count ( args) ?;
350
+ let result = this. pthread_condattr_destroy ( attr) ?;
351
+ this. write_scalar ( Scalar :: from_i32 ( result) , dest) ?;
352
+ }
353
+ "pthread_cond_init" => {
354
+ let & [ cond, attr] = check_arg_count ( args) ?;
355
+ let result = this. pthread_cond_init ( cond, attr) ?;
356
+ this. write_scalar ( Scalar :: from_i32 ( result) , dest) ?;
357
+ }
358
+ "pthread_cond_signal" => {
359
+ let & [ cond] = check_arg_count ( args) ?;
360
+ let result = this. pthread_cond_signal ( cond) ?;
361
+ this. write_scalar ( Scalar :: from_i32 ( result) , dest) ?;
362
+ }
363
+ "pthread_cond_broadcast" => {
364
+ let & [ cond] = check_arg_count ( args) ?;
365
+ let result = this. pthread_cond_broadcast ( cond) ?;
366
+ this. write_scalar ( Scalar :: from_i32 ( result) , dest) ?;
367
+ }
368
+ "pthread_cond_wait" => {
369
+ let & [ cond, mutex] = check_arg_count ( args) ?;
370
+ let result = this. pthread_cond_wait ( cond, mutex) ?;
371
+ this. write_scalar ( Scalar :: from_i32 ( result) , dest) ?;
372
+ }
373
+ "pthread_cond_timedwait" => {
374
+ let & [ cond, mutex, abstime] = check_arg_count ( args) ?;
375
+ this. pthread_cond_timedwait ( cond, mutex, abstime, dest) ?;
376
+ }
377
+ "pthread_cond_destroy" => {
378
+ let & [ cond] = check_arg_count ( args) ?;
379
+ let result = this. pthread_cond_destroy ( cond) ?;
380
+ this. write_scalar ( Scalar :: from_i32 ( result) , dest) ?;
381
+ }
333
382
334
383
// Threading
335
384
"pthread_create" => {
@@ -391,16 +440,11 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
391
440
392
441
| "pthread_attr_init"
393
442
| "pthread_attr_destroy"
394
- | "pthread_condattr_init"
395
- | "pthread_condattr_destroy"
396
- | "pthread_cond_destroy"
397
443
if this. frame ( ) . instance . to_string ( ) . starts_with ( "std::sys::unix::" ) => {
398
444
let & [ _] = check_arg_count ( args) ?;
399
445
this. write_null ( dest) ?;
400
446
}
401
- | "pthread_cond_init"
402
447
| "pthread_attr_setstacksize"
403
- | "pthread_condattr_setclock"
404
448
if this. frame ( ) . instance . to_string ( ) . starts_with ( "std::sys::unix::" ) => {
405
449
let & [ _, _] = check_arg_count ( args) ?;
406
450
this. write_null ( dest) ?;
0 commit comments