Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 1867 → Rev 1868

/trunk/uspace/libc/include/as.h
40,8 → 40,6
#include <kernel/arch/mm/as.h>
#include <kernel/mm/as.h>
 
#define USER_ADDRESS_SPACE_SIZE_ARCH (USER_ADDRESS_SPACE_END_ARCH-USER_ADDRESS_SPACE_START_ARCH+1)
 
extern void *as_area_create(void *address, size_t size, int flags);
extern int as_area_resize(void *address, size_t size, int flags);
extern int as_area_destroy(void *address);
/trunk/uspace/libc/include/stdio.h
40,8 → 40,18
 
#define EOF (-1)
 
#include <string.h>
#include <io/stream.h>
 
#define DEBUG(fmt, ...) \
{ \
char buf[256]; \
int n; \
n = snprintf(buf, sizeof(buf), fmt, ##__VA_ARGS__); \
if (n > 0) \
(void) __SYSCALL3(SYS_IO, 1, (sysarg_t) buf, strlen(buf)); \
}
 
extern int getchar(void);
 
extern int puts(const char * str);
/trunk/uspace/libc/generic/as.c
36,7 → 36,13
#include <libc.h>
#include <unistd.h>
#include <align.h>
#include <types.h>
 
/**
* Either 4*256M on 32-bit architecures or 16*256M on 64-bit architectures.
*/
#define MAX_HEAP_SIZE (sizeof(uintptr_t)<<28)
 
/** Create address space area.
*
* @param address Virtual address where to place new address space area.
141,7 → 147,7
 
/* Set heapsize to some meaningful value */
if (maxheapsize == -1)
set_maxheapsize(ALIGN_UP(USER_ADDRESS_SPACE_SIZE_ARCH >> 1, PAGE_SIZE));
set_maxheapsize(MAX_HEAP_SIZE);
if (!last_allocated)
last_allocated = (void *) ALIGN_UP((void *) &_heap + maxheapsize, PAGE_SIZE);
/trunk/uspace/libc/generic/psthread.c
61,7 → 61,7
/** Counter of threads residing in async_manager */
static int threads_in_manager;
 
/** Setup PSthread information into TCB structure */
/** Setup psthread information into TCB structure */
psthread_data_t * psthread_setup()
{
psthread_data_t *pt;
89,7 → 89,7
free(pt);
}
 
/** Function that is called on entry to new uspace thread */
/** Function that is called on entry to new pseudo thread */
void psthread_main(void)
{
psthread_data_t *pt = __tcb_get()->pst_data;
209,8 → 209,7
return retval;
}
 
/**
* Create a userspace thread
/** Create a userspace pseudo thread.
*
* @param func Pseudo thread function.
* @param arg Argument to pass to func.
/trunk/uspace/libc/arch/sparc64/include/syscall.h
50,6 → 50,7
"ta %5\n"
: "=r" (a1)
: "r" (a1), "r" (a2), "r" (a3), "r" (a4), "i" (id)
: "memory"
);
return a1;