Rev 2556 | Rev 2745 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2556 | Rev 2647 | ||
---|---|---|---|
Line 700... | Line 700... | ||
700 | sh_info = (share_info_t *) malloc(sizeof(share_info_t), 0); |
700 | sh_info = (share_info_t *) malloc(sizeof(share_info_t), 0); |
701 | mutex_initialize(&sh_info->lock); |
701 | mutex_initialize(&sh_info->lock); |
702 | sh_info->refcount = 2; |
702 | sh_info->refcount = 2; |
703 | btree_create(&sh_info->pagemap); |
703 | btree_create(&sh_info->pagemap); |
704 | src_area->sh_info = sh_info; |
704 | src_area->sh_info = sh_info; |
- | 705 | /* |
|
- | 706 | * Call the backend to setup sharing. |
|
- | 707 | */ |
|
- | 708 | src_area->backend->share(src_area); |
|
705 | } else { |
709 | } else { |
706 | mutex_lock(&sh_info->lock); |
710 | mutex_lock(&sh_info->lock); |
707 | sh_info->refcount++; |
711 | sh_info->refcount++; |
708 | mutex_unlock(&sh_info->lock); |
712 | mutex_unlock(&sh_info->lock); |
709 | } |
713 | } |
710 | 714 | ||
711 | src_area->backend->share(src_area); |
- | |
712 | - | ||
713 | mutex_unlock(&src_area->lock); |
715 | mutex_unlock(&src_area->lock); |
714 | mutex_unlock(&src_as->lock); |
716 | mutex_unlock(&src_as->lock); |
715 | 717 | ||
716 | /* |
718 | /* |
717 | * Create copy of the source address space area. |
719 | * Create copy of the source address space area. |