[PATCH 2/4] Add cpukit shared libmm header and stubs

Gedare Bloom gedare at rtems.org
Mon Jul 15 14:22:36 UTC 2013


Are there compiler function attributes that can limit code generation
when stubs are used?

On Sat, Jul 13, 2013 at 7:05 PM, Hesham AL-Matary
<heshamelmatary at gmail.com> wrote:
> From: Hesham ALmatary <heshamelmatary at gmail.com>
>
> ---
>  c/src/lib/libcpu/shared/include/mm.h              | 23 +++++++++++++++++++++++
>  c/src/lib/libcpu/shared/src/no_memorymanagement.c | 17 +++++++++++++++++
>  2 files changed, 40 insertions(+)
>  create mode 100644 c/src/lib/libcpu/shared/include/mm.h
>  create mode 100644 c/src/lib/libcpu/shared/src/no_memorymanagement.c
>
> diff --git a/c/src/lib/libcpu/shared/include/mm.h b/c/src/lib/libcpu/shared/include/mm.h
> new file mode 100644
> index 0000000..02903f1
> --- /dev/null
> +++ b/c/src/lib/libcpu/shared/include/mm.h
> @@ -0,0 +1,23 @@
> +/*
> + * Copyright (c) 2013 Gedare Bloom.
> + *
> + * The license and distribution terms for this file may be
> + * found in the file LICENSE in this distribution or at
> + * http://www.rtems.com/license/LICENSE.
> + */
> +
> +#ifndef __LIBCPU_MM_H
> +#define __LIBCPU_MM_H
> +
> +#include <rtems/score/mm.h>
> +
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
> +void _CPU_Memory_management_Initialize(void);
> +
> +#ifdef __cplusplus
> +}
> +#endif
> +#endif
> diff --git a/c/src/lib/libcpu/shared/src/no_memorymanagement.c b/c/src/lib/libcpu/shared/src/no_memorymanagement.c
> new file mode 100644
> index 0000000..2e3f528
> --- /dev/null
> +++ b/c/src/lib/libcpu/shared/src/no_memorymanagement.c
> @@ -0,0 +1,17 @@
> +/*
> + * Copyright (c) 2013 Hesham AL-Matary
> + * Copyright (c) 2013 Gedare Bloom.
> + *
> + * The license and distribution terms for this file may be
> + * found in the file LICENSE in this distribution or at
> + * http://www.rtems.com/license/LICENSE.
> + */
> +
> +#include <rtems.h>
> +#include <libcpu/mm.h>
> +
> +void _CPU_Memory_management_Initialize( void ) { }
> +
> +void _CPU_Memory_management_Install_entry( Memory_management_Entry *mpe, uint32_t flags ) { }
> +
> +void _CPU_Memory_management_Uninstall_entry( Memory_management_Entry *mpe ) { }
> --
> 1.8.3.1
>
> _______________________________________________
> rtems-devel mailing list
> rtems-devel at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-devel



More information about the devel mailing list