Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 5131 → Rev 5130

/programs/develop/libraries/menuetlibc/src/libc/ansi/stdlib/malloc.c
5,6 → 5,7
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <menuet/sem.h>
 
typedef struct BLOCK {
size_t size;
22,7 → 23,7
#define ALIGN 8
#define SMALL (NUMSMALL*ALIGN)
 
static int malloc_mutex = 0;
DECLARE_STATIC_SEM(malloc_mutex)
 
static BLOCK *slop = 0;
static BLOCK *freelist[30];
32,13 → 33,12
 
static inline void malloc_lock(void)
{
while (__sync_lock_test_and_set(&malloc_mutex, 1))
__menuet__delay100(1);
sem_lock(&malloc_mutex);
}
 
static inline void malloc_unlock(void)
{
__sync_lock_release(&malloc_mutex);
sem_unlock(&malloc_mutex);
}
 
#define MIN_SAVE_EXTRA 64
/programs/develop/libraries/menuetlibc/stub/crt0_coff_dynstack.asm
File deleted
/programs/develop/libraries/menuetlibc/stub/Tupfile.lua
1,3 → 1,2
if tup.getconfig("NO_FASM") ~= "" then return end
tup.rule("crt0_coff.asm", "fasm %f %o", "crt0.o")
tup.rule("crt0_coff_dynstack.asm", "fasm %f %o", "crt0_dynstack.o")