Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Edward A. Lee <[email protected]>
  • Loading branch information
erlingrj and edwardalee authored Nov 10, 2023
1 parent 257a009 commit 198d3c1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
2 changes: 1 addition & 1 deletion core/tag.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ int lf_tag_compare(tag_t tag1, tag_t tag2) {

tag_t lf_delay_tag(tag_t tag, interval_t interval) {
if (tag.time == NEVER || interval < 0LL) return tag;
if (tag.time == FOREVER && tag.microstep == FOREVER_MICROSTEP) return tag;
if (tag.time >= FOREVER - interval) return tag;
tag_t result = tag;
if (interval == 0LL) {
// Note that unsigned variables will wrap on overflow.
Expand Down
29 changes: 16 additions & 13 deletions include/core/reactor.h
Original file line number Diff line number Diff line change
Expand Up @@ -419,32 +419,35 @@ void _lf_initialize_watchdog_mutexes(void);


/**
* @brief Retrives the enclave ids of the direct upstream enclaves.
* The implementation is code-generated.
* @brief Get the array of ids of enclaves directly upstream of the specified enclave.
* This updates the specified result pointer to point to a statically allocated array of IDs
* and returns the length of the array. The implementation is code-generated.
*
* @param enclave_id The enclave for which to search for direct upstream
* @param result This pointer is dereferenced and pointed to the resulting array.
* @return int The number of direct upstreams.
* @param enclave_id The enclave for which to report upstream IDs.
* @param result The pointer to dereference and update to point to the resulting array.
* @return The number of direct upstream enclaves.
*/
int _lf_get_upstream_of(int enclave_id, int** result);

/**
* @brief Retrives the enclave ids of the direct downstream enclaves.
* The implementation is code-generated.
* @brief Get the array of ids of enclaves directly downstream of the specified enclave.
* This updates the specified result pointer to point to a statically allocated array of IDs
* and returns the length of the array. The implementation is code-generated.
*
* @param enclave_id The enclave for which to search for direct downstream.
* @param result This pointer is dereferenced and pointed to the resulting array.
* @return int The number of direct downstream.
* @param enclave_id The enclave for which to report downstream IDs.
* @param result The pointer to dereference and update to point to the resulting array.
* @return The number of direct downstream enclaves.
*/
int _lf_get_downstream_of(int enclave_id, int** result);

/**
* @brief Retrives the delays on the connections to the direct upstream enclaves.
* @brief Retrive the delays on the connections to direct upstream enclaves.
* This updates the result pointer to point to a statically allocated array of delays.
* The implementation is code-generated.
*
* @param enclave_id The enclave for which to search for upstream delays.
* @param result This pointer is dereferenced and pointed to the resulting array.
* @return int The number of direct upstreams.
* @param result The pointer to dereference and update to point to the resulting array.
* @return int The number of direct upstream enclaves.
*/
int _lf_get_upstream_delay_of(int enclave_id, interval_t** result);

Expand Down

0 comments on commit 198d3c1

Please sign in to comment.