Rev 1424 | Rev 1434 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1424 | Rev 1428 | ||
---|---|---|---|
Line 454... | Line 454... | ||
454 | * mapping is done through the backend share function. |
454 | * mapping is done through the backend share function. |
455 | * |
455 | * |
456 | * @param src_as Pointer to source address space. |
456 | * @param src_as Pointer to source address space. |
457 | * @param src_base Base address of the source address space area. |
457 | * @param src_base Base address of the source address space area. |
458 | * @param acc_size Expected size of the source area. |
458 | * @param acc_size Expected size of the source area. |
- | 459 | * @param dst_as Pointer to destination address space. |
|
459 | * @param dst_base Target base address. |
460 | * @param dst_base Target base address. |
460 | * @param dst_flags_mask Destination address space area flags mask. |
461 | * @param dst_flags_mask Destination address space area flags mask. |
461 | * |
462 | * |
462 | * @return Zero on success or ENOENT if there is no such task or |
463 | * @return Zero on success or ENOENT if there is no such task or |
463 | * if there is no such address space area, |
464 | * if there is no such address space area, |
Line 465... | Line 466... | ||
465 | * ENOMEM if there was a problem in allocating destination |
466 | * ENOMEM if there was a problem in allocating destination |
466 | * address space area. ENOTSUP is returned if an attempt |
467 | * address space area. ENOTSUP is returned if an attempt |
467 | * to share non-anonymous address space area is detected. |
468 | * to share non-anonymous address space area is detected. |
468 | */ |
469 | */ |
469 | int as_area_share(as_t *src_as, __address src_base, size_t acc_size, |
470 | int as_area_share(as_t *src_as, __address src_base, size_t acc_size, |
470 | __address dst_base, int dst_flags_mask) |
471 | as_t *dst_as, __address dst_base, int dst_flags_mask) |
471 | { |
472 | { |
472 | ipl_t ipl; |
473 | ipl_t ipl; |
473 | int src_flags; |
474 | int src_flags; |
474 | size_t src_size; |
475 | size_t src_size; |
475 | as_area_t *src_area, *dst_area; |
476 | as_area_t *src_area, *dst_area; |
Line 541... | Line 542... | ||
541 | * attribute set which prevents race condition with |
542 | * attribute set which prevents race condition with |
542 | * preliminary as_page_fault() calls. |
543 | * preliminary as_page_fault() calls. |
543 | * The flags of the source area are masked against dst_flags_mask |
544 | * The flags of the source area are masked against dst_flags_mask |
544 | * to support sharing in less privileged mode. |
545 | * to support sharing in less privileged mode. |
545 | */ |
546 | */ |
546 | dst_area = as_area_create(AS, src_flags & dst_flags_mask, src_size, dst_base, |
547 | dst_area = as_area_create(dst_as, src_flags & dst_flags_mask, src_size, dst_base, |
547 | AS_AREA_ATTR_PARTIAL, src_backend, &src_backend_data); |
548 | AS_AREA_ATTR_PARTIAL, src_backend, &src_backend_data); |
548 | if (!dst_area) { |
549 | if (!dst_area) { |
549 | /* |
550 | /* |
550 | * Destination address space area could not be created. |
551 | * Destination address space area could not be created. |
551 | */ |
552 | */ |