metalsvm/include/metalsvm/stdlib.h
Stefan Lankes f0e4a2b833 add the support of the memory type MPBT
=> seesection "10.1.2 Internal Cache Changes" of SCC External Architecture Specification (R1.1)
2011-04-05 23:43:44 -07:00

59 lines
1.5 KiB
C

/*
* Copyright 2010 Stefan Lankes, Chair for Operating Systems,
* RWTH Aachen University
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* This file is part of MetalSVM.
*/
#ifndef __STDLIB_H__
#define __STDLIB_H__
#include <metalsvm/config.h>
#include <metalsvm/tasks_types.h>
#include <asm/stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
#define MAP_KERNEL_SPACE (1 << 0)
#define MAP_USER_SPACE (1 << 1)
#define MAP_PAGE_TABLE (1 << 2)
#define MAP_NO_CACHE (1 << 3)
#define MAP_STACK (1 << 4)
#define MAP_HEAP (1 << 5)
#define MAP_CODE (1 << 6)
#define MAP_READONLY (1 << 7)
#ifdef CONFIG_ROCKCREEK
#define MAP_MPE (1 << 8)
#endif
void NORETURN abort(void);
void* kmalloc(size_t);
void* mem_allocation(size_t sz, uint32_t flags);
void kfree(void*, size_t);
long strtol(const char* str, char** endptr, int base);
unsigned long strtoul(const char* nptr, char** endptr, int base);
static inline int atoi(const char *str)
{
return (int)strtol(str, (char **)NULL, 10);
}
#ifdef __cplusplus
}
#endif
#endif