projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add new demo files
[lttng-ust.git]
/
libringbuffer
/
shm.c
diff --git
a/libringbuffer/shm.c
b/libringbuffer/shm.c
index fd0919fac3b75ad057e9c0aed87efd676847a76a..994204d1e0a2463829a8e73e3cb0cf078eae1c0f 100644
(file)
--- a/
libringbuffer/shm.c
+++ b/
libringbuffer/shm.c
@@
-16,7
+16,8
@@
#include <stdio.h>
#include <signal.h>
#include <dirent.h>
#include <stdio.h>
#include <signal.h>
#include <dirent.h>
-#include <ust/align.h>
+#include <lttng/align.h>
+#include <helper.h>
struct shm_object_table *shm_object_table_create(size_t max_nb_obj)
{
struct shm_object_table *shm_object_table_create(size_t max_nb_obj)
{
@@
-203,11
+204,13
@@
void shmp_object_destroy(struct shm_object *obj)
{
int ret, i;
{
int ret, i;
- ret = munmap(obj->memory_map, obj->memory_map_size);
- if (ret) {
- PERROR("umnmap");
- assert(0);
- }
+ if (!obj->is_shadow) {
+ ret = munmap(obj->memory_map, obj->memory_map_size);
+ if (ret) {
+ PERROR("umnmap");
+ assert(0);
+ }
+ }
ret = close(obj->shm_fd);
if (ret) {
PERROR("close");
ret = close(obj->shm_fd);
if (ret) {
PERROR("close");
This page took
0.02454 seconds
and
4
git commands to generate.