Skip to content

Commit

Permalink
win warn fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
tmori committed Dec 29, 2024
1 parent 8db8cf0 commit e165086
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
8 changes: 7 additions & 1 deletion sample/base-procs/hako-cmd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,15 @@ add_executable(
target_link_libraries(
hako-cmd
hako
-pthread
)

if (NOT WIN32)
target_link_libraries(
hako-cmd
-pthread
)
endif()

#message(STATUS "HAKO_INTERFACE_DIR=" ${HAKO_INTERFACE_DIR})

target_include_directories(
Expand Down
1 change: 1 addition & 0 deletions src/hako/data/hako_master_data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ namespace hako::data {
this->shmp_ = hako::utils::hako_shared_memory_create(this->shm_type_);
auto shmid = this->shmp_->create_memory(HAKO_SHARED_MEMORY_ID_0, sizeof(HakoMasterDataType));
HAKO_ASSERT(shmid >= 0);
(void)shmid;
void *datap = this->shmp_->lock_memory(HAKO_SHARED_MEMORY_ID_0);
this->master_datap_ = static_cast<HakoMasterDataType*>(datap);
{
Expand Down
1 change: 1 addition & 0 deletions src/hako/data/hako_pdu_data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ namespace hako::data {
std::cout << "START CREATE PDU DATA: total_size= " << total_size << std::endl;
auto shmid = this->asset_shmp_->create_memory(HAKO_SHARED_MEMORY_ID_1, total_size);
HAKO_ASSERT(shmid >= 0);
(void)shmid;
void *datap = this->asset_shmp_->lock_memory(HAKO_SHARED_MEMORY_ID_1);
this->pdu_ = static_cast<char*>(datap);
{
Expand Down
5 changes: 5 additions & 0 deletions src/hako/utils/hako_share/impl/hako_sem_flock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,31 +125,36 @@ int32_t hako::utils::sem::flock::create(int32_t key)
void hako::utils::sem::flock::destroy(int32_t sem_id)
{
HAKO_ASSERT(sem_id >= 0);
(void)sem_id;
hako_flock_destroy(flock_handle);
return;
}

void hako::utils::sem::flock::asset_down(int32_t sem_id, int32_t asset_id)
{
HAKO_ASSERT(sem_id >= 0);
(void)sem_id;
hako_sem_down(HAKO_SEM_INX_ASSETS + asset_id);
return;
}
void hako::utils::sem::flock::asset_up(int32_t sem_id, int32_t asset_id)
{
HAKO_ASSERT(sem_id >= 0);
(void)sem_id;
hako_sem_up(HAKO_SEM_INX_ASSETS + asset_id);
return;
}
void hako::utils::sem::flock::master_lock(int32_t sem_id)
{
HAKO_ASSERT(sem_id >= 0);
(void)sem_id;
hako_sem_down(HAKO_SEM_INX_MASTER);
return;
}
void hako::utils::sem::flock::master_unlock(int32_t sem_id)
{
HAKO_ASSERT(sem_id >= 0);
(void)sem_id;
hako_sem_up(HAKO_SEM_INX_MASTER);
return;
}

0 comments on commit e165086

Please sign in to comment.