Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 1416 → Rev 1417

/kernel/trunk/generic/src/mm/as.c
458,10 → 458,11
* in its pagemap B+tree. The new address space are simply gets the
* sh_info of the source area.
*
* @param src_as Pointer to source address space
* @param src_as Pointer to source address space.
* @param src_base Base address of the source address space area.
* @param acc_size Expected size of the source area
* @param dst_base Target base address
* @param acc_size Expected size of the source area.
* @param dst_base Target base address.
* @param dst_flags_mask Destination address space area flags mask.
*
* @return Zero on success or ENOENT if there is no such task or
* if there is no such address space area,
471,7 → 472,7
* to share non-anonymous address space area is detected.
*/
int as_area_share(as_t *src_as, __address src_base, size_t acc_size,
__address dst_base)
__address dst_base, int dst_flags_mask)
{
ipl_t ipl;
int src_flags;
567,8 → 568,11
* The destination area is created with AS_AREA_ATTR_PARTIAL
* attribute set which prevents race condition with
* preliminary as_page_fault() calls.
* The flags of the source area are masked against dst_flags_mask
* to support sharing in less privileged mode.
*/
dst_area = as_area_create(AS, src_flags, src_size, dst_base, AS_AREA_ATTR_PARTIAL, &anon_backend, NULL);
dst_area = as_area_create(AS, src_flags & dst_flags_mask, src_size, dst_base,
AS_AREA_ATTR_PARTIAL, &anon_backend, NULL);
if (!dst_area) {
/*
* Destination address space area could not be created.