Skip to content

Commit

Permalink
shm: The limits have been made in Make.defs and remove useless macro …
Browse files Browse the repository at this point in the history
…in code

ifeq ($(CONFIG_MM_SHM),y)
CSRCS += shmat.c shmctl.c shmdt.c shmget.c

DEPPATH += --dep-path shm
VPATH += :shm
endif

Signed-off-by: zhangshoukui <[email protected]>
  • Loading branch information
Zhangshoukui authored and xiaoxiang781216 committed Sep 18, 2024
1 parent e607137 commit 8e4e09b
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 15 deletions.
3 changes: 0 additions & 3 deletions mm/shm/shm.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
#include <nuttx/addrenv.h>
#include <nuttx/mutex.h>

#ifdef CONFIG_MM_SHM

/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
Expand Down Expand Up @@ -143,5 +141,4 @@ extern struct shm_info_s g_shminfo;

void shm_destroy(int shmid);

#endif /* CONFIG_MM_SHM */
#endif /* __MM_SHM_SHM_H */
3 changes: 0 additions & 3 deletions mm/shm/shmat.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
#include "sched/sched.h"
#include "shm/shm.h"

#ifdef CONFIG_MM_SHM

/****************************************************************************
* Private Functions
****************************************************************************/
Expand Down Expand Up @@ -309,4 +307,3 @@ FAR void *shmat(int shmid, FAR const void *shmaddr, int shmflg)
return (FAR void *)ERROR;
}

#endif /* CONFIG_MM_SHM */
3 changes: 0 additions & 3 deletions mm/shm/shmctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@

#include "shm/shm.h"

#ifdef CONFIG_MM_SHM

/****************************************************************************
* Public Functions
****************************************************************************/
Expand Down Expand Up @@ -249,4 +247,3 @@ void shm_destroy(int shmid)
memset(region, 0, sizeof(struct shm_region_s));
}

#endif /* CONFIG_MM_SHM */
3 changes: 0 additions & 3 deletions mm/shm/shmdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
#include "sched/sched.h"
#include "shm/shm.h"

#ifdef CONFIG_MM_SHM

/****************************************************************************
* Public Functions
****************************************************************************/
Expand Down Expand Up @@ -114,4 +112,3 @@ int shmdt(FAR const void *shmaddr)
return ret;
}

#endif /* CONFIG_MM_SHM */
3 changes: 0 additions & 3 deletions mm/shm/shmget.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@

#include "shm/shm.h"

#ifdef CONFIG_MM_SHM

/****************************************************************************
* Public Data
****************************************************************************/
Expand Down Expand Up @@ -483,4 +481,3 @@ int shmget(key_t key, size_t size, int shmflg)
return ERROR;
}

#endif /* CONFIG_MM_SHM */

0 comments on commit 8e4e09b

Please sign in to comment.