@@ -292,6 +292,45 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
292
292
let result = this. pthread_rwlock_destroy ( args[ 0 ] ) ?;
293
293
this. write_scalar ( Scalar :: from_i32 ( result) , dest) ?;
294
294
}
295
+ "pthread_condattr_init" => {
296
+ let result = this. pthread_condattr_init ( args[ 0 ] ) ?;
297
+ this. write_scalar ( Scalar :: from_i32 ( result) , dest) ?;
298
+ }
299
+ "pthread_condattr_setclock" => {
300
+ let result = this. pthread_condattr_setclock ( args[ 0 ] , args[ 1 ] ) ?;
301
+ this. write_scalar ( Scalar :: from_i32 ( result) , dest) ?;
302
+ }
303
+ "pthread_condattr_getclock" => {
304
+ let result = this. pthread_condattr_getclock ( args[ 0 ] , args[ 1 ] ) ?;
305
+ this. write_scalar ( Scalar :: from_i32 ( result) , dest) ?;
306
+ }
307
+ "pthread_condattr_destroy" => {
308
+ let result = this. pthread_condattr_destroy ( args[ 0 ] ) ?;
309
+ this. write_scalar ( Scalar :: from_i32 ( result) , dest) ?;
310
+ }
311
+ "pthread_cond_init" => {
312
+ let result = this. pthread_cond_init ( args[ 0 ] , args[ 1 ] ) ?;
313
+ this. write_scalar ( Scalar :: from_i32 ( result) , dest) ?;
314
+ }
315
+ "pthread_cond_signal" => {
316
+ let result = this. pthread_cond_signal ( args[ 0 ] ) ?;
317
+ this. write_scalar ( Scalar :: from_i32 ( result) , dest) ?;
318
+ }
319
+ "pthread_cond_broadcast" => {
320
+ let result = this. pthread_cond_broadcast ( args[ 0 ] ) ?;
321
+ this. write_scalar ( Scalar :: from_i32 ( result) , dest) ?;
322
+ }
323
+ "pthread_cond_wait" => {
324
+ let result = this. pthread_cond_wait ( args[ 0 ] , args[ 1 ] ) ?;
325
+ this. write_scalar ( Scalar :: from_i32 ( result) , dest) ?;
326
+ }
327
+ "pthread_cond_timedwait" => {
328
+ this. pthread_cond_timedwait ( args[ 0 ] , args[ 1 ] , args[ 2 ] , dest) ?;
329
+ }
330
+ "pthread_cond_destroy" => {
331
+ let result = this. pthread_cond_destroy ( args[ 0 ] ) ?;
332
+ this. write_scalar ( Scalar :: from_i32 ( result) , dest) ?;
333
+ }
295
334
296
335
// Threading
297
336
"pthread_create" => {
@@ -340,12 +379,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
340
379
// These shims are enabled only when the caller is in the standard library.
341
380
| "pthread_attr_init"
342
381
| "pthread_attr_destroy"
343
- | "pthread_attr_setstacksize"
344
- | "pthread_condattr_init"
345
- | "pthread_condattr_setclock"
346
- | "pthread_cond_init"
347
- | "pthread_condattr_destroy"
348
- | "pthread_cond_destroy" if this. frame ( ) . instance . to_string ( ) . starts_with ( "std::sys::unix::" )
382
+ | "pthread_attr_setstacksize" if this. frame ( ) . instance . to_string ( ) . starts_with ( "std::sys::unix::" )
349
383
=> {
350
384
this. write_null ( dest) ?;
351
385
}
0 commit comments