Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2475 → Rev 2476

/trunk/kernel/generic/include/errno.h
37,7 → 37,7
 
/* 1-255 are kernel error codes, 256-512 are user error codes */
 
#define EOK 0 /* No error */
#define EOK 0 /* No error */
#define ENOENT -1 /* No such entry */
#define ENOMEM -2 /* Not enough memory */
#define ELIMIT -3 /* Limit exceeded */
44,9 → 44,10
#define EREFUSED -4 /* Connection refused */
#define EFORWARD -5 /* Forward error */
#define EPERM -6 /* Permission denied */
#define EHANGUP -7 /* Answerbox closed connection, call sys_ipc_hangup
* to close the connection. Used by answerbox
* to close the connection. */
#define EHANGUP -7 /* Answerbox closed connection, call
* sys_ipc_hangup() to close the connection.
* Used by answerbox to close the connection.
*/
#define EEXISTS -8 /* Entry already exists */
#define EBADMEM -9 /* Bad memory pointer */
#define ENOTSUP -10 /* Not supported */
/trunk/uspace/ns/ns.c
55,7 → 55,8
#define NS_HASH_TABLE_CHAINS 20
 
static int register_service(ipcarg_t service, ipcarg_t phone, ipc_call_t *call);
static int connect_to_service(ipcarg_t service, ipc_call_t *call, ipc_callid_t callid);
static int connect_to_service(ipcarg_t service, ipc_call_t *call,
ipc_callid_t callid);
 
/* Static functions implementing NS hash table operations. */
static hash_index_t ns_hash(unsigned long *key);
83,7 → 84,8
static void *clockaddr = NULL;
static void *klogaddr = NULL;
 
static void get_as_area(ipc_callid_t callid, ipc_call_t *call, char *name, void **addr)
static void get_as_area(ipc_callid_t callid, ipc_call_t *call, char *name,
void **addr)
{
void *ph_addr;
 
106,7 → 108,8
ipcarg_t retval;
 
if (!hash_table_create(&ns_hash_table, NS_HASH_TABLE_CHAINS, 3, &ns_hash_table_ops)) {
if (!hash_table_create(&ns_hash_table, NS_HASH_TABLE_CHAINS, 3,
&ns_hash_table_ops)) {
return ENOMEM;
}
134,19 → 137,21
/*
* Server requests service registration.
*/
retval = register_service(IPC_GET_ARG1(call), IPC_GET_ARG3(call), &call);
retval = register_service(IPC_GET_ARG1(call),
IPC_GET_ARG3(call), &call);
break;
case IPC_M_CONNECT_ME_TO:
/*
* Client requests to be connected to a service.
*/
retval = connect_to_service(IPC_GET_ARG1(call), &call, callid);
retval = connect_to_service(IPC_GET_ARG1(call), &call,
callid);
break;
default:
retval = ENOENT;
break;
}
if (! (callid & IPC_CALLID_NOTIFICATION)) {
if (!(callid & IPC_CALLID_NOTIFICATION)) {
ipc_answer_fast(callid, retval, 0, 0);
}
}
162,7 → 167,11
*/
int register_service(ipcarg_t service, ipcarg_t phone, ipc_call_t *call)
{
unsigned long keys[3] = { service, call->in_phone_hash, 0 };
unsigned long keys[3] = {
service,
call->in_phone_hash,
0
};
hashed_service_t *hs;
if (hash_table_find(&ns_hash_table, keys)) {
/trunk/uspace/fb/font-8x16.h
26,10 → 26,10
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
 
#ifndef __FONT_8X16_H__
#define __FONT_8X16_H__
#ifndef FB_FONT_8X16_H_
#define FB_FONT_8X16_H_
 
#define FONT_GLIPHS 256
#define FONT_GLIPHS 256
#define FONT_SCANLINES 16
 
extern unsigned char fb_font[FONT_GLIPHS * FONT_SCANLINES];
/trunk/uspace/fb/ega.h
34,10 → 34,10
/** @file
*/
 
#ifndef _EGA_H_
#define _EGA_H_
#ifndef FB_EGA_H_
#define FB_EGA_H_
 
int ega_init(void);
extern int ega_init(void);
 
#endif
 
/trunk/uspace/fb/ppm.h
26,15 → 26,13
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
 
#ifndef _PPM_H_
#define _PPM_H_
#ifndef FB_PPM_H_
#define FB_PPM_H_
 
#include "fb.h"
 
int ppm_draw(unsigned char *data, size_t datasz, unsigned int sx,
unsigned int sy,
unsigned int maxwidth, unsigned int maxheight,
putpixel_cb_t fnc,void *);
int ppm_get_data(unsigned char *data, size_t dtsz, unsigned int *width, unsigned int *height);
extern int ppm_draw(unsigned char *, size_t, unsigned int, unsigned int,
unsigned int, unsigned int, putpixel_cb_t, void *);
extern int ppm_get_data(unsigned char *, size_t, unsigned int *, unsigned int *);
 
#endif
/trunk/uspace/fb/main.h
26,9 → 26,9
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
 
#ifndef __MAIN_H_
#define __MAIN_H_
#ifndef FB_MAIN_H_
#define FB_MAIN_H_
 
void receive_comm_area(ipc_callid_t callid, ipc_call_t *call, void **area);
extern void receive_comm_area(ipc_callid_t, ipc_call_t *, void **);
 
#endif
/trunk/uspace/fb/sysio.h
34,13 → 34,12
/** @file
*/
 
#ifndef _SYSIO_H_
#define _SYSIO_H_
#ifndef FB_SYSIO_H_
#define FB_SYSIO_H_
 
void sysio_init(void);
extern void sysio_init(void);
 
#endif
 
/** @}
*/
 
/trunk/uspace/fb/fb.h
33,15 → 33,14
/** @file
*/
 
#ifndef _FB_H_
#define _FB_H_
#ifndef FB_FB_H_
#define FB_FB_H_
 
typedef void (* putpixel_cb_t)(void *,unsigned int, unsigned int, int);
typedef void (* putpixel_cb_t)(void *, unsigned int, unsigned int, int);
 
int fb_init(void);
extern int fb_init(void);
 
#endif
 
/** @}
*/