/[hurd]/hurd-l4/physmem/container.c
ViewVC logotype

Diff of /hurd-l4/physmem/container.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by marcus, Thu Apr 15 11:07:59 2004 UTC revision 1.9 by marcus, Wed Oct 27 20:19:21 2004 UTC
# Line 1  Line 1 
1  /* Main function for physical memory server.  /* container.c - container class for physical memory server.
2     Copyright (C) 2003 Free Software Foundation, Inc.     Copyright (C) 2003 Free Software Foundation, Inc.
3     Written by Marcus Brinkmann.     Written by Marcus Brinkmann.
4    
# Line 79  container_map (hurd_cap_rpc_context_t ct Line 79  container_map (hurd_cap_rpc_context_t ct
79    l4_word_t start;    l4_word_t start;
80    l4_word_t end;    l4_word_t end;
81    l4_word_t nr_fpages;    l4_word_t nr_fpages;
82    l4_fpage_t fpages[L4_FPAGE_SPAN_MAX];  #define MAX_MAP_ITEMS ((L4_NUM_MRS - 1) / 2)
83      l4_fpage_t fpages[MAX_MAP_ITEMS];
84    l4_word_t i;    l4_word_t i;
85    
86    /* FIXME FIXME FIXME */    /* FIXME FIXME FIXME */
# Line 97  container_map (hurd_cap_rpc_context_t ct Line 98  container_map (hurd_cap_rpc_context_t ct
98      }      }
99    
100    l4_msg_clear (ctx->msg);    l4_msg_clear (ctx->msg);
101    nr_fpages = l4_fpage_span (start, end, fpages);    nr_fpages = l4_fpage_xspan (start, end, vaddr, fpages, MAX_MAP_ITEMS);
102    
103    for (i = 0; i < nr_fpages; i++)    for (i = 0; i < nr_fpages; i++)
104      {      {
# Line 110  container_map (hurd_cap_rpc_context_t ct Line 111  container_map (hurd_cap_rpc_context_t ct
111        l4_msg_append_map_item (ctx->msg, map_item);        l4_msg_append_map_item (ctx->msg, map_item);
112        vaddr += l4_size (fpage);        vaddr += l4_size (fpage);
113      }      }
   
114    return 0;    return 0;
115  }  }
116    
# Line 150  container_class_init () Line 150  container_class_init ()
150    
151    
152  /* Allocate a new container object covering the NR_FPAGES fpages  /* Allocate a new container object covering the NR_FPAGES fpages
153     listed in FPAGES.  The object is locked and has one reference.  */     listed in FPAGES.  The object returned is locked and has one
154       reference.  */
155  error_t  error_t
156  container_alloc (l4_word_t nr_fpages, l4_word_t *fpages,  container_alloc (l4_word_t nr_fpages, l4_word_t *fpages,
157                   hurd_cap_obj_t *r_obj)                   hurd_cap_obj_t *r_obj)

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26