Home | History | Annotate | Download | only in src

Lines Matching refs:area

2  *  IPC SHM area manager
42 * \brief Create a shm area record
44 * \param ptr the shared area pointer
45 * \return The allocated shm area record, NULL if fail
47 * Allocates a shared area record with the given SHM ID and pointer.
52 struct snd_shm_area *area = malloc(sizeof(*area));
53 if (area) {
54 area->shmid = shmid;
55 area->ptr = ptr;
56 area->share = 1;
57 list_add_tail(&area->list, &shm_areas);
59 return area;
63 * \brief Increase the reference counter of shm area record
64 * \param area shm area record
65 * \return the shm area record (identical with the argument)
67 * Increases the reference counter of the given shared area record.
69 struct snd_shm_area *snd_shm_area_share(struct snd_shm_area *area)
71 if (area == NULL)
73 area->share++;
74 return area;
78 * \brief Release the shared area record
79 * \param area the shared are record
82 * Decreases the reference counter of the given shared area record, and
85 int snd_shm_area_destroy(struct snd_shm_area *area)
87 if (area == NULL)
89 if (--area->share)
91 list_del(&area->list);
92 shmdt(area->ptr);
93 free(area);
102 struct snd_shm_area *area;
105 area = list_entry(pos, struct snd_shm_area, list);
106 shmdt(area->ptr);