Skip to content

Commit fd6b9c4

Browse files
committed
---
yaml --- r: 157461 b: refs/heads/snap-stage3 c: 6f253bd h: refs/heads/master i: 157459: c07f491 v: v3
1 parent 5dd79ce commit fd6b9c4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 065caf34f5ff29e04605f95d9c5d511af219439a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 6c18e508f10aa5bf42dc80691654b9cde2a661cd
4+
refs/heads/snap-stage3: 6f253bd49e80c809b7c22fd257bcef06a8ca7c30
55
refs/heads/try: 0ee4d8b0b112c608646fa75463ab4dc59132efd9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/librustrt/mutex.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ mod imp {
516516

517517
#[cfg(windows)]
518518
mod imp {
519-
use alloc::libc_heap::malloc_raw;
519+
use alloc::heap;
520520
use core::atomic;
521521
use core::ptr;
522522
use libc::{HANDLE, BOOL, LPSECURITY_ATTRIBUTES, c_void, DWORD, LPCSTR};
@@ -607,7 +607,7 @@ mod imp {
607607
}
608608

609609
pub unsafe fn init_lock() -> uint {
610-
let block = malloc_raw(CRIT_SECTION_SIZE as uint) as *mut c_void;
610+
let block = heap::allocate(CRIT_SECTION_SIZE, 8) as *mut c_void;
611611
InitializeCriticalSectionAndSpinCount(block, SPIN_COUNT);
612612
return block as uint;
613613
}
@@ -619,7 +619,7 @@ mod imp {
619619

620620
pub unsafe fn free_lock(h: uint) {
621621
DeleteCriticalSection(h as LPCRITICAL_SECTION);
622-
libc::free(h as *mut c_void);
622+
heap::deallocate(h as *mut u8, CRIT_SECTION_SIZE, 8);
623623
}
624624

625625
pub unsafe fn free_cond(h: uint) {

0 commit comments

Comments
 (0)