-
Notifications
You must be signed in to change notification settings - Fork 338
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The functions for working with priority values were spread across two source files name "priority" and "prival". This change consolidates them to the "prival" files so that they are located in a single file named consistently with existing struct members.
- Loading branch information
1 parent
ab72891
commit 4ed5f17
Showing
18 changed files
with
334 additions
and
386 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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,55 @@ | ||
/* SPDX-License-Identifier: Apache-2.0 */ | ||
|
||
/* | ||
* Copyright 2018-2024 Joel E. Anderson | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#ifndef __STUMPLESS_PRIVATE_PRIVAL_H | ||
#define __STUMPLESS_PRIVATE_PRIVAL_H | ||
|
||
#include <stumpless/facility.h> | ||
#include <stumpless/severity.h> | ||
|
||
/** | ||
* Gets the priority value from facility and severity parameters. | ||
* | ||
* Priority value is calculated by left shifting the facility value by 3 | ||
* and adding it to the severity value which is according to the | ||
* RFC 5424 Section 6.2.1. The shift operation is done prior to get_prival() | ||
* function with macros in "facility.h" | ||
* | ||
* Moved from "private/entry.h" to "private/prival.h" in release v3.0.0. | ||
* | ||
* **Thread Safety: MT-Safe** | ||
* This function is thread safe. | ||
* | ||
* **Async Signal Safety: AS-Safe ** | ||
* This function must be safe to call from signal handlers | ||
* | ||
* **Async Cancel Safety: AC-Safe** | ||
* This function must be safe to call from threads that may be asynchronously | ||
* cancelled. | ||
* | ||
* @param facility Facility value. This should be a \c STUMPLESS_FACILITY value. | ||
* | ||
* @param severity Severity value. This should be a \c STUMPLESS_SEVERITY value | ||
* | ||
* @return Priority value | ||
*/ | ||
int | ||
get_prival( enum stumpless_facility facility, | ||
enum stumpless_severity severity ); | ||
|
||
#endif /* __STUMPLESS_PRIVATE_PRIVAL_H */ |
This file contains 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 contains 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 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
Oops, something went wrong.