@@ -116,18 +116,6 @@ impl<'tcx> AnalysisCtxt<'tcx> {
116116 | "__udivmodti4" | "__udivti3" | "__umodti3" | "__aeabi_fcmpeq" | "__aeabi_fcmpun"
117117 | "__aeabi_dcmpun" | "__aeabi_uldivmod" => NO_ASSUMPTION ,
118118
119- // Memory allocations glues depended by liballoc.
120- // Allocation functions may sleep.
121- "__rust_alloc"
122- | "__rust_alloc_zeroed"
123- | "__rust_realloc"
124- | "__rg_alloc"
125- | "__rg_alloc_zeroed"
126- | "__rg_realloc" => MIGHT_SLEEP ,
127-
128- // Deallocation function will not sleep.
129- "__rust_dealloc" | "__rg_dealloc" => USE_SPINLOCK ,
130-
131119 // `init_module` and `cleanup_module` exposed from Rust modules are allowed to sleep.
132120 "init_module" | "cleanup_module" => MIGHT_SLEEP ,
133121
@@ -259,6 +247,18 @@ impl<'tcx> AnalysisCtxt<'tcx> {
259247 "__INIT_WORK_WITH_KEY" | "queue_work_on" => NO_ASSUMPTION ,
260248 "destroy_workqueue" => MIGHT_SLEEP ,
261249
250+ // Memory allocations glues depended by liballoc.
251+ // Allocation functions may sleep.
252+ f if f. ends_with ( "__rust_alloc" )
253+ || f. ends_with ( "__rust_alloc_zeroed" )
254+ || f. ends_with ( "__rust_realloc" ) =>
255+ {
256+ MIGHT_SLEEP
257+ }
258+
259+ // Deallocation function will not sleep.
260+ f if f. ends_with ( "__rust_dealloc" ) => USE_SPINLOCK ,
261+
262262 _ => {
263263 warn ! ( "Unable to determine property for FFI function `{}`" , symbol) ;
264264 return None ;
0 commit comments