Fixed some type inconsistencies in the kernel.

This commit is contained in:
Kees van Reeuwijk
2010-01-26 12:26:06 +00:00
parent b67f788eea
commit c8a11b5453
13 changed files with 34 additions and 51 deletions

View File

@@ -83,7 +83,7 @@ register message *m_ptr; /* pointer to request message */
/* Check for overflow. This would happen for 64K segments and 16-bit
* vir_bytes. Especially copying by the PM on do_fork() is affected.
*/
if (bytes != (vir_bytes) bytes) return(E2BIG);
if (bytes != (phys_bytes) (vir_bytes) bytes) return(E2BIG);
/* Now try to make the actual virtual copy. */
return( virtual_copy_vmcheck(&vir_addr[_SRC_], &vir_addr[_DST_], bytes) );

View File

@@ -28,7 +28,7 @@ message *m_ptr; /* pointer to request message */
proc_nr_t proc_nr, proc_nr_e;
int sig_nr = m_ptr->SIG_NUMBER;
proc_nr_e= m_ptr->SIG_ENDPT;
proc_nr_e= (proc_nr_t) m_ptr->SIG_ENDPT;
if (!isokendpt(proc_nr_e, &proc_nr)) return(EINVAL);
if (sig_nr >= _NSIG) return(EINVAL);

View File

@@ -45,7 +45,7 @@ endpoint_t *e_granter; /* new granter (magic grants) */
{
static cp_grant_t g;
static int proc_nr;
static struct proc *granter_proc;
static const struct proc *granter_proc;
int r, depth = 0;
do {

View File

@@ -121,7 +121,7 @@ PUBLIC int map_invoke_vm(int req_type, /* VMPTYPE_... COWMAP, SMAP, SUNMAP */
size_t size, int flag)
{
struct proc *caller, *src, *dst;
vir_bytes lin_src, lin_dst;
phys_bytes lin_src, lin_dst;
src = endpoint_lookup(end_s);
dst = endpoint_lookup(end_d);
@@ -154,7 +154,7 @@ PUBLIC int map_invoke_vm(int req_type, /* VMPTYPE_... COWMAP, SMAP, SUNMAP */
caller->p_vmrequest.params.map.vir_d = lin_dst; /* destination addr */
caller->p_vmrequest.params.map.ep_s = end_s; /* source process */
caller->p_vmrequest.params.map.vir_s = lin_src; /* source address */
caller->p_vmrequest.params.map.length = size;
caller->p_vmrequest.params.map.length = (vir_bytes) size;
caller->p_vmrequest.params.map.writeflag = flag;
caller->p_vmrequest.type = VMSTYPE_MAP;
@@ -175,10 +175,10 @@ register message *m_ptr;
{
endpoint_t grantor = m_ptr->SMAP_EP;
cp_grant_id_t gid = m_ptr->SMAP_GID;
vir_bytes offset = m_ptr->SMAP_OFFSET;
int seg = (int)m_ptr->SMAP_SEG;
vir_bytes address = m_ptr->SMAP_ADDRESS;
vir_bytes bytes = m_ptr->SMAP_BYTES;
vir_bytes offset = (vir_bytes) m_ptr->SMAP_OFFSET;
int seg = (int) m_ptr->SMAP_SEG;
vir_bytes address = (vir_bytes) m_ptr->SMAP_ADDRESS;
vir_bytes bytes = (vir_bytes) m_ptr->SMAP_BYTES;
int flag = m_ptr->SMAP_FLAG;
vir_bytes offset_result;