* Removed some variants of the SYS_GETINFO calls from the kernel; replaced them with new PM and utils libary functionality. Fixed bugs in utils library that used old get_kenv() variant. * Implemented a buffer in the kernel to gather random data. Memory driver periodically checks this for /dev/random. A better random algorithm can now be implemented in the driver. Removed SYS_RANDOM; the SYS_GETINFO call is used instead. * Remove SYS_KMALLOC from the kernel. Memory allocation can now be done at the process manager with new 'other' library functions.
		
			
				
	
	
		
			17 lines
		
	
	
		
			319 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			319 B
		
	
	
	
		
			C
		
	
	
	
	
	
#include <lib.h>
 | 
						|
#define freemem	_freemem
 | 
						|
#include <unistd.h>
 | 
						|
 | 
						|
 | 
						|
PUBLIC int freemem(size, base)
 | 
						|
phys_bytes size;			/* size of mem chunk requested */
 | 
						|
phys_bytes base;			/* base address of mem chunk */
 | 
						|
{
 | 
						|
  message m;
 | 
						|
  m.m4_l1 = size;		
 | 
						|
  m.m4_l2 = base;		
 | 
						|
  if (_syscall(MM, FREEMEM, &m) < 0) return(-1);
 | 
						|
  return(0);
 | 
						|
}
 | 
						|
 |