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

Iox2 2 rename crates #26

Merged
merged 2 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ macos_aarch64_stable_debug_task:
<<: *IOX2_CARGO_FMT_AND_CLIPPY
<<: *IOX2_COMMON_BUILD_DEBUG
test_script:
- cargo test -p iceoryx2-pal-concurrency-primitives
- cargo test -p iceoryx2-pal-concurrency-sync
-p iceoryx2-pal-posix
-p iceoryx2-bb-container
-p iceoryx2-bb-elementary
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ jobs:
# - name: Run cargo test subset
# run: |
# cargo test
# -p iceoryx2_pal_concurrency_primitives
# -p iceoryx2_pal_concurrency_sync
# -p iceoryx2_pal_posix
# -p iceoryx2_bb_container
# -p iceoryx2_bb_elementary
Expand Down
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ members = [

"iceoryx2-cal",
"iceoryx2",
"iceoryx2-pal/concurrency-primitives",
"iceoryx2-pal/concurrency-sync",
"iceoryx2-pal/posix/",
"iceoryx2-pal/settings/",
"iceoryx2-pal/configuration/",

"examples",

Expand Down Expand Up @@ -45,9 +45,9 @@ iceoryx2-bb-posix = { version = "0.0.1", path = "iceoryx2-bb/posix/" }
iceoryx2-bb-system-types = { version = "0.0.1", path = "iceoryx2-bb/system-types/" }
iceoryx2-bb-testing = { version = "0.0.1", path = "iceoryx2-bb/testing/" }

iceoryx2-pal-concurrency-primitives = { version = "0.0.1", path = "iceoryx2-pal/concurrency-primitives/" }
iceoryx2-pal-concurrency-sync = { version = "0.0.1", path = "iceoryx2-pal/concurrency-sync/" }
iceoryx2-pal-posix = { version = "0.0.1", path = "iceoryx2-pal/posix/" }
iceoryx2-pal-settings = { version = "0.0.1", path = "iceoryx2-pal/settings/" }
iceoryx2-pal-configuration = { version = "0.0.1", path = "iceoryx2-pal/configuration/" }

iceoryx2-cal = { version = "0.0.1", path = "iceoryx2-cal" }

Expand Down
2 changes: 1 addition & 1 deletion iceoryx2-bb/posix/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ iceoryx2-bb-system-types = { workspace = true }
iceoryx2-bb-elementary = { workspace = true }
iceoryx2-bb-log = { workspace = true }
iceoryx2-pal-posix = { workspace = true }
iceoryx2-pal-settings = { workspace = true }
iceoryx2-pal-configuration = { workspace = true }

lazy_static = { workspace = true }
bitflags = { workspace = true }
Expand Down
6 changes: 3 additions & 3 deletions iceoryx2-bb/posix/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ pub const ADAPTIVE_WAIT_FINAL_WAITING_TIME: Duration = Duration::from_millis(10)

// directories
pub const TEMP_DIRECTORY: Path =
unsafe { Path::new_unchecked(iceoryx2_pal_settings::TEMP_DIRECTORY) };
unsafe { Path::new_unchecked(iceoryx2_pal_configuration::TEMP_DIRECTORY) };
pub const TEST_DIRECTORY: Path =
unsafe { Path::new_unchecked(iceoryx2_pal_settings::TEST_DIRECTORY) };
unsafe { Path::new_unchecked(iceoryx2_pal_configuration::TEST_DIRECTORY) };
pub const SHARED_MEMORY_DIRECTORY: Path =
unsafe { Path::new_unchecked(iceoryx2_pal_settings::SHARED_MEMORY_DIRECTORY) };
unsafe { Path::new_unchecked(iceoryx2_pal_configuration::SHARED_MEMORY_DIRECTORY) };

// TODO unable to verify?
pub const ACL_LIST_CAPACITY: u32 = 25;
Expand Down
2 changes: 1 addition & 1 deletion iceoryx2-bb/posix/src/directory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ use iceoryx2_bb_container::semantic_string::SemanticStringAccessor;
use iceoryx2_bb_elementary::enum_gen;
use iceoryx2_bb_log::{error, fail, fatal_panic, trace};
use iceoryx2_bb_system_types::{file_name::FileName, file_path::FilePath, path::Path};
use iceoryx2_pal_configuration::PATH_SEPARATOR;
use iceoryx2_pal_posix::posix::Struct;
use iceoryx2_pal_posix::*;
use iceoryx2_pal_posix::{posix::errno::Errno, posix::S_IFDIR};
use iceoryx2_pal_settings::PATH_SEPARATOR;

use crate::file::{File, FileRemoveError};
use crate::file_type::FileType;
Expand Down
2 changes: 1 addition & 1 deletion iceoryx2-bb/posix/src/shared_memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ use iceoryx2_bb_log::{error, fail, fatal_panic, trace};
use iceoryx2_bb_system_types::file_name::*;
use iceoryx2_bb_system_types::file_path::*;
use iceoryx2_bb_system_types::path::*;
use iceoryx2_pal_configuration::PATH_SEPARATOR;
use iceoryx2_pal_posix::posix::errno::Errno;
use iceoryx2_pal_posix::posix::POSIX_SUPPORT_ADVANCED_SIGNAL_HANDLING;
use iceoryx2_pal_posix::posix::POSIX_SUPPORT_PERSISTENT_SHARED_MEMORY;
use iceoryx2_pal_posix::*;
use iceoryx2_pal_settings::PATH_SEPARATOR;

use std::ptr::NonNull;

Expand Down
2 changes: 1 addition & 1 deletion iceoryx2-bb/posix/tests/directory_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use iceoryx2_bb_system_types::file_name::FileName;
use iceoryx2_bb_system_types::file_path::FilePath;
use iceoryx2_bb_system_types::path::Path;
use iceoryx2_bb_testing::assert_that;
use iceoryx2_pal_settings::PATH_SEPARATOR;
use iceoryx2_pal_configuration::PATH_SEPARATOR;

struct TestFixture {
files: Vec<FilePath>,
Expand Down
2 changes: 1 addition & 1 deletion iceoryx2-bb/system-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ version = { workspace = true }
[dependencies]
iceoryx2-bb-container = { workspace = true }
iceoryx2-bb-log = { workspace = true }
iceoryx2-pal-settings = { workspace = true }
iceoryx2-pal-configuration = { workspace = true }
serde = { workspace = true }

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion iceoryx2-bb/system-types/src/file_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
//! ```

use iceoryx2_bb_container::semantic_string;
use iceoryx2_pal_settings::FILENAME_LENGTH;
use iceoryx2_pal_configuration::FILENAME_LENGTH;

semantic_string! {
/// Represents a file name. The restriction are choosen in a way that it is platform independent.
Expand Down
2 changes: 1 addition & 1 deletion iceoryx2-bb/system-types/src/file_path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ use iceoryx2_bb_container::byte_string::FixedSizeByteString;
use iceoryx2_bb_container::semantic_string;
use iceoryx2_bb_container::semantic_string::SemanticStringError;
use iceoryx2_bb_log::fail;
use iceoryx2_pal_settings::{PATH_LENGTH, PATH_SEPARATOR};
use iceoryx2_pal_configuration::{PATH_LENGTH, PATH_SEPARATOR};

semantic_string! {
/// Represents a file path. The restriction are choosen in a way that it is platform independent.
Expand Down
8 changes: 4 additions & 4 deletions iceoryx2-bb/system-types/src/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ use iceoryx2_bb_container::byte_string::FixedSizeByteString;
use iceoryx2_bb_container::semantic_string;

use iceoryx2_bb_log::fail;
use iceoryx2_pal_settings::{FILENAME_LENGTH, PATH_SEPARATOR, ROOT};
use iceoryx2_pal_configuration::{FILENAME_LENGTH, PATH_SEPARATOR, ROOT};

use crate::file_path::FilePath;
use iceoryx2_bb_container::semantic_string::*;

const PATH_LENGTH: usize = iceoryx2_pal_settings::PATH_LENGTH;
const PATH_LENGTH: usize = iceoryx2_pal_configuration::PATH_LENGTH;

semantic_string! {
name: Path,
Expand Down Expand Up @@ -88,9 +88,9 @@ impl Path {
let msg = format!("Unable to add entry \"{}\" to path since it would exceed the maximum supported path length of {} or the entry contains invalid symbols.",
entry, PATH_LENGTH);
if !self.is_empty()
&& self.as_bytes()[self.len() - 1] != iceoryx2_pal_settings::PATH_SEPARATOR
&& self.as_bytes()[self.len() - 1] != iceoryx2_pal_configuration::PATH_SEPARATOR
{
fail!(from self, when self.push(iceoryx2_pal_settings::PATH_SEPARATOR),
fail!(from self, when self.push(iceoryx2_pal_configuration::PATH_SEPARATOR),
"{}", msg);
}

Expand Down
2 changes: 1 addition & 1 deletion iceoryx2-bb/testing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ rust-version = { workspace = true }
version = { workspace = true }

[dependencies]
iceoryx2-pal-settings = { workspace = true }
iceoryx2-pal-configuration = { workspace = true }
3 changes: 2 additions & 1 deletion iceoryx2-bb/testing/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ macro_rules! test_requires {
}
}

pub const AT_LEAST_TIMING_VARIANCE: f32 = iceoryx2_pal_settings::settings::AT_LEAST_TIMING_VARIANCE;
pub const AT_LEAST_TIMING_VARIANCE: f32 =
iceoryx2_pal_configuration::settings::AT_LEAST_TIMING_VARIANCE;
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "iceoryx2-pal-concurrency-primitives"
name = "iceoryx2-pal-concurrency-sync"
description = "Iceoryx2: [internal] low-level basic building blocks to implement posix mutex, condition variables etc."
categories = { workspace = true }
edition = { workspace = true }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use std::sync::atomic::{AtomicI32, Ordering};

use iceoryx2_bb_testing::assert_that;
use iceoryx2_pal_concurrency_primitives::barrier::*;
use iceoryx2_pal_concurrency_sync::barrier::*;

#[test]
fn barrier_with_multiple_waiter_works() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use std::{
};

use iceoryx2_bb_testing::{assert_that, watchdog::Watchdog};
use iceoryx2_pal_concurrency_primitives::{barrier::Barrier, condition_variable::*};
use iceoryx2_pal_concurrency_sync::{barrier::Barrier, condition_variable::*};

const TIMEOUT: Duration = Duration::from_millis(25);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use std::{
};

use iceoryx2_bb_testing::assert_that;
use iceoryx2_pal_concurrency_primitives::mutex::*;
use iceoryx2_pal_concurrency_sync::mutex::*;

const TIMEOUT: Duration = Duration::from_millis(25);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use std::{
};

use iceoryx2_bb_testing::assert_that;
use iceoryx2_pal_concurrency_primitives::{barrier::Barrier, rwlock::*};
use iceoryx2_pal_concurrency_sync::{barrier::Barrier, rwlock::*};

const TIMEOUT: Duration = Duration::from_millis(25);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use std::{
};

use iceoryx2_bb_testing::assert_that;
use iceoryx2_pal_concurrency_primitives::semaphore::*;
use iceoryx2_pal_concurrency_sync::semaphore::*;

const TIMEOUT: Duration = Duration::from_millis(25);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "iceoryx2-pal-settings"
name = "iceoryx2-pal-configuration"
description = "Iceoryx2: [internal] platform specific settings"
categories = { workspace = true }
edition = { workspace = true }
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions iceoryx2-pal/posix/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ cc = { workspace = true }
bindgen = { workspace = true }

[dependencies]
iceoryx2-pal-concurrency-primitives = { workspace = true }
iceoryx2-pal-settings = { workspace = true }
iceoryx2-pal-concurrency-sync = { workspace = true }
iceoryx2-pal-configuration = { workspace = true }
lazy_static = { workspace = true }

[target.'cfg(windows)'.dependencies]
Expand Down
2 changes: 1 addition & 1 deletion iceoryx2-pal/posix/src/macos/mman.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#![allow(non_camel_case_types)]
#![allow(clippy::missing_safety_doc)]

use iceoryx2_pal_settings::PATH_SEPARATOR;
use iceoryx2_pal_configuration::PATH_SEPARATOR;

use crate::posix::*;

Expand Down
6 changes: 3 additions & 3 deletions iceoryx2-pal/posix/src/macos/pthread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
use crate::posix::*;

use core::sync::atomic::{AtomicU32, Ordering};
use iceoryx2_pal_concurrency_primitives::barrier::Barrier;
use iceoryx2_pal_concurrency_primitives::mutex::Mutex;
use iceoryx2_pal_concurrency_primitives::rwlock::*;
use iceoryx2_pal_concurrency_sync::barrier::Barrier;
use iceoryx2_pal_concurrency_sync::mutex::Mutex;
use iceoryx2_pal_concurrency_sync::rwlock::*;
use std::cell::UnsafeCell;

#[derive(Clone, Copy)]
Expand Down
2 changes: 1 addition & 1 deletion iceoryx2-pal/posix/src/macos/semaphore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#![allow(clippy::missing_safety_doc)]
#![allow(unused_variables)]

use iceoryx2_pal_concurrency_primitives::semaphore::Semaphore;
use iceoryx2_pal_concurrency_sync::semaphore::Semaphore;

use crate::posix::pthread::{wait, wake_one};
use crate::posix::Errno;
Expand Down
2 changes: 1 addition & 1 deletion iceoryx2-pal/posix/src/macos/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@

pub(crate) const MAX_FILE_NAME_LENGTH: usize = 255;
pub(crate) const MAX_PATH_LENGTH: usize = 255;
pub(crate) const SHM_STATE_DIRECTORY: &[u8] = iceoryx2_pal_settings::TEMP_DIRECTORY;
pub(crate) const SHM_STATE_DIRECTORY: &[u8] = iceoryx2_pal_configuration::TEMP_DIRECTORY;
pub(crate) const SHM_STATE_SUFFIX: &[u8] = b".shm_state";
10 changes: 5 additions & 5 deletions iceoryx2-pal/posix/src/macos/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@

use crate::posix::{Struct, *};
use core::sync::atomic::AtomicU64;
use iceoryx2_pal_concurrency_primitives::barrier::Barrier;
use iceoryx2_pal_concurrency_primitives::condition_variable::*;
use iceoryx2_pal_concurrency_primitives::mutex::Mutex;
use iceoryx2_pal_concurrency_primitives::rwlock::*;
use iceoryx2_pal_concurrency_primitives::semaphore::*;
use iceoryx2_pal_concurrency_sync::barrier::Barrier;
use iceoryx2_pal_concurrency_sync::condition_variable::*;
use iceoryx2_pal_concurrency_sync::mutex::Mutex;
use iceoryx2_pal_concurrency_sync::rwlock::*;
use iceoryx2_pal_concurrency_sync::semaphore::*;

pub type ulong = usize;

Expand Down
2 changes: 1 addition & 1 deletion iceoryx2-pal/posix/src/windows/mman.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use crate::posix::{constants::*, settings::*, to_dir_search_string, types::*, Errno, Struct};
use crate::win32call;

use iceoryx2_pal_settings::PATH_SEPARATOR;
use iceoryx2_pal_configuration::PATH_SEPARATOR;
use windows_sys::Win32::Storage::FileSystem::{
FindClose, FindFirstFileA, FindNextFileA, FILE_ATTRIBUTE_DIRECTORY, WIN32_FIND_DATAA,
};
Expand Down
4 changes: 2 additions & 2 deletions iceoryx2-pal/posix/src/windows/pthread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ use std::{
time::UNIX_EPOCH,
};

use iceoryx2_pal_concurrency_primitives::rwlock::*;
use iceoryx2_pal_concurrency_primitives::{barrier::Barrier, mutex::Mutex};
use iceoryx2_pal_concurrency_sync::rwlock::*;
use iceoryx2_pal_concurrency_sync::{barrier::Barrier, mutex::Mutex};
use windows_sys::Win32::{
Foundation::{CloseHandle, ERROR_TIMEOUT, STILL_ACTIVE, WAIT_FAILED},
System::{
Expand Down
2 changes: 1 addition & 1 deletion iceoryx2-pal/posix/src/windows/semaphore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use std::sync::atomic::AtomicU32;
use std::time::SystemTime;
use std::time::UNIX_EPOCH;

use iceoryx2_pal_concurrency_primitives::semaphore::Semaphore;
use iceoryx2_pal_concurrency_sync::semaphore::Semaphore;
use windows_sys::Win32::System::Threading::WaitOnAddress;
use windows_sys::Win32::System::Threading::WakeByAddressSingle;
use windows_sys::Win32::System::Threading::INFINITE;
Expand Down
2 changes: 1 addition & 1 deletion iceoryx2-pal/posix/src/windows/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use windows_sys::Win32::Foundation::MAX_PATH;

pub(crate) const MAX_PATH_LENGTH: usize = MAX_PATH as usize;
pub(crate) const SHM_STATE_DIRECTORY: &[u8] = iceoryx2_pal_settings::TEMP_DIRECTORY;
pub(crate) const SHM_STATE_DIRECTORY: &[u8] = iceoryx2_pal_configuration::TEMP_DIRECTORY;
pub(crate) const SHM_STATE_SUFFIX: &[u8] = b".shm_state";
#[doc(hidden)]
pub const FD_SET_CAPACITY: usize = 64;
2 changes: 1 addition & 1 deletion iceoryx2-pal/posix/src/windows/signal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#![allow(clippy::missing_safety_doc)]
#![allow(unused_variables)]

use iceoryx2_pal_concurrency_primitives::mutex::Mutex;
use iceoryx2_pal_concurrency_sync::mutex::Mutex;
use windows_sys::Win32::{
Foundation::{FALSE, TRUE},
System::{
Expand Down
10 changes: 5 additions & 5 deletions iceoryx2-pal/posix/src/windows/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
use std::fmt::Debug;
use std::sync::atomic::AtomicU64;

use iceoryx2_pal_concurrency_primitives::barrier::Barrier;
use iceoryx2_pal_concurrency_primitives::condition_variable::*;
use iceoryx2_pal_concurrency_primitives::mutex::Mutex;
use iceoryx2_pal_concurrency_primitives::rwlock::*;
use iceoryx2_pal_concurrency_primitives::semaphore::Semaphore;
use iceoryx2_pal_concurrency_sync::barrier::Barrier;
use iceoryx2_pal_concurrency_sync::condition_variable::*;
use iceoryx2_pal_concurrency_sync::mutex::Mutex;
use iceoryx2_pal_concurrency_sync::rwlock::*;
use iceoryx2_pal_concurrency_sync::semaphore::Semaphore;
use windows_sys::Win32::Foundation::{HANDLE, INVALID_HANDLE_VALUE};
use windows_sys::Win32::Networking::WinSock::{SOCKADDR_IN, TIMEVAL};

Expand Down
2 changes: 1 addition & 1 deletion iceoryx2-pal/posix/src/windows/win32_handle_translator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use windows_sys::Win32::{

use crate::posix::{c_string_length, ntohs, types::*};
use core::{cell::UnsafeCell, panic};
use iceoryx2_pal_concurrency_primitives::mutex::Mutex;
use iceoryx2_pal_concurrency_sync::mutex::Mutex;
use std::sync::atomic::{AtomicBool, AtomicU32, AtomicUsize, Ordering};

use super::win32_udp_port_to_uds_name::{PortToUds, MAX_UDS_NAME_LEN};
Expand Down