[rtems-libbsd commit] rec_close.c: Removed usage of munmap() method.

Joel Sherrill joel.sherrill at OARcorp.com
Thu Sep 13 19:46:50 UTC 2012


Please add to libbsd.txt to note which files are impacted by
the inversion of the MMAP conditional.

On 9/13/2012 2:02 PM, Jennifer Averett wrote:
> Module:    rtems-libbsd
> Branch:    master
> Commit:    99dc0d7d9b5f02f5d2a649b49dc2d083d01c68ab
> Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=99dc0d7d9b5f02f5d2a649b49dc2d083d01c68ab
>
> Author:    Jennifer Averett <jennifer.averett at oarcorp.com>
> Date:      Thu Sep 13 14:03:35 2012 -0500
>
> rec_close.c: Removed usage of munmap() method.
>
> Note that there is a define MMAP_NOT_AVAILABLE that when NOT
> defined results in mmap not being called but munmap is still
> called.  A comment was also added to our notes about this.
>
> ---
>
>   freebsd-userspace/lib/libc/db/recno/rec_close.c |    4 +++-
>   libbsd.txt                                      |    9 +++++++++
>   2 files changed, 12 insertions(+), 1 deletions(-)
>
> diff --git a/freebsd-userspace/lib/libc/db/recno/rec_close.c b/freebsd-userspace/lib/libc/db/recno/rec_close.c
> index 2a78d2d..388ee4a 100644
> --- a/freebsd-userspace/lib/libc/db/recno/rec_close.c
> +++ b/freebsd-userspace/lib/libc/db/recno/rec_close.c
> @@ -77,9 +77,11 @@ __rec_close(DB *dbp)
>   
>   	/* Committed to closing. */
>   	status = RET_SUCCESS;
> +
> +#ifndef __rtems__   /* XXX */
>   	if (F_ISSET(t, R_MEMMAPPED) && munmap(t->bt_smap, t->bt_msize))
>   		status = RET_ERROR;
> -
> +#endif
>   	if (!F_ISSET(t, R_INMEM)) {
>   		if (F_ISSET(t, R_CLOSEFP)) {
>   			if (fclose(t->bt_rfp))
> diff --git a/libbsd.txt b/libbsd.txt
> index 8eb063d..c0582e7 100644
> --- a/libbsd.txt
> +++ b/libbsd.txt
> @@ -775,3 +775,12 @@ E1000 EM		_bsd_em_pcimodule_sys_init	Links
>   
>   Symbols (A)
>            pci_get_vpd_ident
> +
> +== Problems to report to FreeBSD ==
> +
> +The MMAP_NOT_AVAILABLE define is inverted on its usage.  When it is
> +defined the mmap method is called. Additionally, it is not used
> +thoroughly. It is not used in the unmap portion of the source.
> +
> +
> +
>
> _______________________________________________
> rtems-vc mailing list
> rtems-vc at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-vc


-- 
Joel Sherrill, Ph.D.             Director of Research&  Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
     Support Available             (256) 722-9985




More information about the devel mailing list