Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace session pointer with refcount #320

Closed
wants to merge 27 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
0f36124
Fix c99 compilation (#317)
jean-roland Jan 12, 2024
eda86ad
fix: set correct session pointer type
jean-roland Jan 12, 2024
cb53c88
refactor: rename sptr to rc
jean-roland Jan 12, 2024
1829706
feat: add compiler based definition
jean-roland Jan 12, 2024
9b30759
fix: allocate int instead of int pointer
jean-roland Jan 12, 2024
bdf82db
fix: align implementation counter size
jean-roland Jan 12, 2024
74c5842
fix: require single thread config to use single thread implem
jean-roland Jan 12, 2024
9d03bbc
feat: add c99 gcc rc implementation
jean-roland Jan 12, 2024
b2d1c56
refactor: rename derived sptr types to rc
jean-roland Jan 12, 2024
a8f0332
feat: name anon struct for forward declaration
jean-roland Jan 12, 2024
d19bf4d
feat: add _z_session refcounter type
jean-roland Jan 12, 2024
67fb7bc
chore: clang-format
jean-roland Jan 12, 2024
7d62647
chore: update gitignore
jean-roland Jan 15, 2024
065561d
build: add compiler id log
jean-roland Jan 15, 2024
b46b865
build: add compiler symbol on platformio builds
jean-roland Jan 15, 2024
10525c4
feat: remove superfluous function
jean-roland Jan 15, 2024
26b47aa
feat: go through indirect session pointer
jean-roland Jan 15, 2024
2fdf5e0
fix: use correct type type for session pointers
jean-roland Jan 16, 2024
ad5eaec
feat: use session ref counter in z_session
jean-roland Jan 16, 2024
938ff3b
fix: prevent segfault when clearing empty session
jean-roland Jan 16, 2024
90aa500
fix: drop owned config all the time
jean-roland Jan 16, 2024
a317e75
feat: add new_from_val rc function
jean-roland Jan 17, 2024
347b153
feat: switch publisher sesssion ptr to rc
jean-roland Jan 17, 2024
ed85d6e
feat: switch subscriber session ptr to rc
jean-roland Jan 17, 2024
867f2cd
fix: remove unnecessary dependency
jean-roland Jan 17, 2024
1a5b522
fix: add necessary dependency
jean-roland Jan 17, 2024
455ad9a
feat: switch queryable session ptr to rc
jean-roland Jan 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: require single thread config to use single thread implem
  • Loading branch information
jean-roland committed Jan 12, 2024
commit 74c5842683929bc1b0740cf35682b3e05f1dd91f
8 changes: 6 additions & 2 deletions include/zenoh-pico/collections/refcount.h
Original file line number Diff line number Diff line change
@@ -18,6 +18,7 @@
#include <stdbool.h>
#include <stdint.h>

#if Z_FEATURE_MULTI_THREAD == 1
#if ZENOH_C_STANDARD != 99

#ifndef __cplusplus
@@ -95,7 +96,10 @@
} \
return dropped; \
}
#else
#else // ZENOH_C_STANDARD == 99
#error "Multi-thread refcount in C99 only exists for GCC, use GCC or C11 or deactivate multi-thread"
#endif // ZENOH_C_STANDARD != 99
#else // Z_FEATURE_MULTI_THREAD == 0
/*------------------ Internal Array Macros ------------------*/
#define _Z_REFCOUNT_DEFINE(name, type) \
typedef struct { \
@@ -150,6 +154,6 @@
} \
return dropped; \
}
#endif // ZENOH_C_STANDARD != 99
#endif // Z_FEATURE_MULTI_THREAD == 1

#endif /* ZENOH_PICO_COLLECTIONS_REFCOUNT_H */