generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 8
Implement receive thread for IPC client #3
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
fa0114a
Remove socket server from ggl-sdk
archigup c782386
Guard memcmp from null pointers in ggl_buffer_eq
archigup c6c5f35
Add ggl-sdk initialization function
archigup 3fe61f2
Clear init functions after initializing
archigup bd89370
Fix publish_to_iot_core file extension
archigup 6f6b728
Move private_get_system_config to private header
archigup 1c4d04f
Move ggipc_connect_by_name to private header
archigup ba2a2d5
Mark EventStreamMessageFlags as a flag enum
archigup 5b77d5f
Handle IPC responses on another thread
archigup 5ba4a1b
Remove ggl/version.h from sdk
archigup File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| // aws-greengrass-sdk-lite - Lightweight AWS IoT Greengrass SDK | ||
| // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| #ifndef GGL_SDK_H | ||
| #define GGL_SDK_H | ||
|
|
||
| /// Initializes the sdk, including starting necessary threads. | ||
| /// Unused portions of sdk may not be initialized. | ||
| /// Exits on error. | ||
| void ggl_sdk_init(void); | ||
|
|
||
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| // aws-greengrass-sdk-lite - Lightweight AWS IoT Greengrass SDK | ||
| // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| #ifndef GGL_INIT_H | ||
| #define GGL_INIT_H | ||
|
|
||
| #include <ggl/attr.h> | ||
| #include <ggl/error.h> | ||
|
|
||
| typedef struct GglInitEntry { | ||
| GglError (*fn)(void); | ||
| struct GglInitEntry *next; | ||
| } GglInitEntry; | ||
|
|
||
| /// Initializes the sdk, including starting necessary threads. | ||
| /// Unused portions of sdk may not be initialized. | ||
| /// Not thread-safe | ||
| void ggl_register_init_fn(GglInitEntry *entry) NONNULL(1); | ||
|
|
||
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| // aws-greengrass-sdk-lite - Lightweight AWS IoT Greengrass SDK | ||
| // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| #include <ggl/error.h> | ||
| #include <ggl/init.h> | ||
| #include <ggl/log.h> | ||
| #include <ggl/sdk.h> | ||
| #include <stdlib.h> | ||
|
|
||
| static GglInitEntry *init_list = NULL; | ||
|
|
||
| void ggl_register_init_fn(GglInitEntry *entry) { | ||
| entry->next = init_list; | ||
| init_list = entry; | ||
| } | ||
|
|
||
| void ggl_sdk_init(void) { | ||
| GglInitEntry *list = init_list; | ||
| init_list = NULL; | ||
|
|
||
| while (list != NULL) { | ||
| GglError ret = list->fn(); | ||
| if (ret != GGL_ERR_OK) { | ||
| GGL_LOGE("Failed to initialize (%u).", (unsigned) ret); | ||
| _Exit(1); | ||
| } | ||
|
|
||
| list = list->next; | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.