Added empty stubs for all missing BeOS VM functions.
The lock_memory()/unlock_memory() functions cannot be implemented right now, as the NewOS VM doesn't support locking. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4346 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+92
-3
@@ -3,7 +3,9 @@
|
|||||||
** Distributed under the terms of the NewOS License.
|
** Distributed under the terms of the NewOS License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <Errors.h>
|
|
||||||
|
#include <OS.h>
|
||||||
|
#include <KernelExport.h>
|
||||||
#include <kerrors.h>
|
#include <kerrors.h>
|
||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
#include <vm.h>
|
#include <vm.h>
|
||||||
@@ -20,7 +22,6 @@
|
|||||||
#include <console.h>
|
#include <console.h>
|
||||||
#include <int.h>
|
#include <int.h>
|
||||||
#include <smp.h>
|
#include <smp.h>
|
||||||
#include <OS.h>
|
|
||||||
#include <lock.h>
|
#include <lock.h>
|
||||||
#include <khash.h>
|
#include <khash.h>
|
||||||
#include <thread.h>
|
#include <thread.h>
|
||||||
@@ -2262,6 +2263,86 @@ int user_memset(void *s, char c, size_t count)
|
|||||||
// #pragma mark -
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
|
long
|
||||||
|
lock_memory(void *buffer, ulong numBytes, ulong flags)
|
||||||
|
{
|
||||||
|
// The NewOS VM currently doesn't support locking - dunno if we'll
|
||||||
|
// ever change this, but if, we should definitely implement these
|
||||||
|
// functions :-)
|
||||||
|
return B_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
long
|
||||||
|
unlock_memory(void *buffer, ulong numBytes, ulong flags)
|
||||||
|
{
|
||||||
|
return B_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
long
|
||||||
|
get_memory_map(const void *address, ulong numBytes, physical_entry *table, long numEntries)
|
||||||
|
{
|
||||||
|
// The BeBook says:
|
||||||
|
// "RETURN CODES
|
||||||
|
// The function always returns
|
||||||
|
// B_OK."
|
||||||
|
// Well, not anymore :-))
|
||||||
|
//
|
||||||
|
// IOW: ToDo: implement get_memory_map()
|
||||||
|
|
||||||
|
return B_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
area_id
|
||||||
|
area_for(void *address)
|
||||||
|
{
|
||||||
|
// ToDo: implement area_for()
|
||||||
|
return B_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
area_id
|
||||||
|
find_area(const char *name)
|
||||||
|
{
|
||||||
|
// ToDo: implement find_area()
|
||||||
|
return B_NAME_NOT_FOUND;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
status_t
|
||||||
|
_get_area_info(area_id area, area_info *info, size_t size)
|
||||||
|
{
|
||||||
|
// ToDo: implement get_area_info()
|
||||||
|
return B_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
status_t
|
||||||
|
_get_next_area_info(team_id team, int32 *cookie, area_info *info, size_t size)
|
||||||
|
{
|
||||||
|
// ToDo: implement get_next_area_info()
|
||||||
|
return B_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
status_t
|
||||||
|
set_area_protection(area_id area, uint32 newProtection)
|
||||||
|
{
|
||||||
|
// ToDo: implement set_area_protection()
|
||||||
|
return B_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
status_t
|
||||||
|
resize_area(area_id area, size_t newSize)
|
||||||
|
{
|
||||||
|
// ToDo: implement resize_area()
|
||||||
|
return B_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static status_t
|
static status_t
|
||||||
convertAddressSpec(uint32 *_spec)
|
convertAddressSpec(uint32 *_spec)
|
||||||
{
|
{
|
||||||
@@ -2327,7 +2408,15 @@ map_physical_memory(const char *name, void *physicalAddress, size_t numBytes,
|
|||||||
addressSpec, numBytes, protection, (addr)physicalAddress);
|
addressSpec, numBytes, protection, (addr)physicalAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
area_id
|
||||||
|
clone_area(const char *name, void **_address, uint32 addressSpec, uint32 protection,
|
||||||
|
area_id source_area)
|
||||||
|
{
|
||||||
|
return B_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
area_id
|
area_id
|
||||||
create_area_etc(struct team *team, const char *name, void **address, uint32 addressSpec,
|
create_area_etc(struct team *team, const char *name, void **address, uint32 addressSpec,
|
||||||
uint32 size, uint32 lock, uint32 protection)
|
uint32 size, uint32 lock, uint32 protection)
|
||||||
|
|||||||
Reference in New Issue
Block a user