|
@@ -31,6 +31,7 @@
|
|
|
#include <pthread.h>
|
|
#include <pthread.h>
|
|
|
// #include <alchemy/task.h>
|
|
// #include <alchemy/task.h>
|
|
|
|
|
|
|
|
|
|
+int g_l_shm_init = 0xff;
|
|
|
static int m_reset; //看门狗复位变量
|
|
static int m_reset; //看门狗复位变量
|
|
|
struct completion *g_exit_completion_gprs_net_IEC_proc;
|
|
struct completion *g_exit_completion_gprs_net_IEC_proc;
|
|
|
static int g_exit_flag;
|
|
static int g_exit_flag;
|
|
@@ -319,11 +320,15 @@ int di_do_adc (void *unused)
|
|
|
struct shmem_fd shmem_fd;
|
|
struct shmem_fd shmem_fd;
|
|
|
if (share_mem_init_v2(&shmem_fd) < 0){
|
|
if (share_mem_init_v2(&shmem_fd) < 0){
|
|
|
printf("--->shmem_init fail !!!\r\n");
|
|
printf("--->shmem_init fail !!!\r\n");
|
|
|
|
|
+ g_l_shm_init = -1;
|
|
|
return -1;
|
|
return -1;
|
|
|
} else {
|
|
} else {
|
|
|
|
|
+ g_l_shm_init = 0;
|
|
|
printf("--->shmem_init success !!!\r\n");
|
|
printf("--->shmem_init success !!!\r\n");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ check_shmdata_change();
|
|
|
|
|
+
|
|
|
// 装置类型us_machine_type (分布式:1,集中式:2)
|
|
// 装置类型us_machine_type (分布式:1,集中式:2)
|
|
|
struct t_shmdata_machine_type machine_type = {0};
|
|
struct t_shmdata_machine_type machine_type = {0};
|
|
|
machine_type.us_machine_type = 2;
|
|
machine_type.us_machine_type = 2;
|