Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
ef5f65af
Commit
ef5f65af
authored
Mar 10, 2010
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mac OS X runtime modifications
parent
68846391
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
157 additions
and
18 deletions
+157
-18
src/exe/rt_ini/src/ini.c
src/exe/rt_ini/src/ini.c
+3
-3
src/lib/co/src/co_syi.h
src/lib/co/src/co_syi.h
+1
-0
src/lib/co/src/os_linux/co_syi.c
src/lib/co/src/os_linux/co_syi.c
+12
-0
src/lib/co/src/os_macos/co_syi.c
src/lib/co/src/os_macos/co_syi.c
+12
-0
src/lib/rt/src/os_macos/rt_qos.c
src/lib/rt/src/os_macos/rt_qos.c
+77
-0
src/lib/rt/src/rt_plc_thread.c
src/lib/rt/src/rt_plc_thread.c
+2
-2
src/lib/rt/src/rt_qdb.c
src/lib/rt/src/rt_qdb.c
+4
-2
src/tools/bld/src/os_macos/exe_generic.mk
src/tools/bld/src/os_macos/exe_generic.mk
+1
-1
wb/exp/com/src/wb_wiz_directoryvolume.pwr_com
wb/exp/com/src/wb_wiz_directoryvolume.pwr_com
+12
-4
wb/exp/com/src/wb_wiz_rootvolume.pwr_com
wb/exp/com/src/wb_wiz_rootvolume.pwr_com
+11
-4
wb/lib/wb/src/wb_wccm.cpp
wb/lib/wb/src/wb_wccm.cpp
+20
-0
wb/lib/wb/src/wb_wtt.cpp
wb/lib/wb/src/wb_wtt.cpp
+2
-2
No files found.
src/exe/rt_ini/src/ini.c
View file @
ef5f65af
...
...
@@ -1967,15 +1967,15 @@ ini_ProcPrio (
)
{
char
set
[
100
];
pwr_dStatus
(
sts
,
status
,
INI__SUCCESS
);
if
(
pp
->
flags
.
b
.
running
)
return
;
if
(
pp
->
flags
.
b
.
run
)
{
#if defined(OS_LINUX) || defined(OS_MACOS)
#if defined(OS_LINUX)
char
set
[
100
];
if
(
!
(
pp
->
flags
.
b
.
plc
))
{
sprintf
(
set
,
"rt_prio -rp %d %d"
,
pp
->
proc
.
p_prio
,
pp
->
proc
.
pid
);
system
(
set
);
...
...
src/lib/co/src/co_syi.h
View file @
ef5f65af
...
...
@@ -37,6 +37,7 @@ char *syi_NodeSpec (pwr_tStatus*, char*, int);
pwr_tBoolean
syi_LocalBoot
(
pwr_tStatus
*
);
pwr_tStatus
syi_UserName
(
char
*
user
,
int
len
);
const
char
*
syi_Hardware
();
const
char
*
syi_OpSys
();
char
*
syi_ProcessId
();
#if defined __cplusplus
...
...
src/lib/co/src/os_linux/co_syi.c
View file @
ef5f65af
...
...
@@ -153,6 +153,18 @@ const char *syi_Hardware()
return
hw
;
}
const
char
*
syi_OpSys
()
{
#if defined OS_LINUX
static
const
char
opsys
[]
=
"Linux"
;
#elif defined OS_MACOS
static
const
char
opsys
[]
=
"MacOS"
;
#else
static
const
char
opsys
[]
=
"Unknown"
;
#endif
return
opsys
;
}
char
*
syi_ProcessId
()
{
static
char
pidstr
[
40
];
...
...
src/lib/co/src/os_macos/co_syi.c
View file @
ef5f65af
...
...
@@ -153,6 +153,18 @@ const char *syi_Hardware()
return
hw
;
}
const
char
*
syi_OpSys
()
{
#if defined OS_LINUX
static
const
char
opsys
[]
=
"Linux"
;
#elif defined OS_MACOS
static
const
char
opsys
[]
=
"MacOS"
;
#else
static
const
char
opsys
[]
=
"Unknown"
;
#endif
return
opsys
;
}
char
*
syi_ProcessId
()
{
static
char
pidstr
[
40
];
...
...
src/lib/rt/src/os_macos/rt_qos.c
View file @
ef5f65af
...
...
@@ -113,6 +113,7 @@ qos_WaitQueOld (
#endif
#if 0
pwr_tBoolean
qos_WaitQue (
pwr_tStatus *status,
...
...
@@ -164,6 +165,68 @@ qos_WaitQue (
return signal;
}
#endif
pwr_tBoolean
qos_WaitQue
(
pwr_tStatus
*
status
,
qdb_sQue
*
qp
,
int
tmo
)
{
struct
timespec
ts
;
int
remaining_time
=
tmo
;
int
delta
=
100
;
ts
.
tv_sec
=
0
;
qdb_AssumeLocked
;
qp
->
lock
.
waiting
=
TRUE
;
qdb_Unlock
;
if
(
tmo
==
-
1
)
{
ts
.
tv_nsec
=
delta
*
1000000
;
while
(
1
)
{
if
(
!
qp
->
lock
.
waiting
)
{
*
status
=
QCOM__SUCCESS
;
qdb_Lock
;
return
1
;
}
nanosleep
(
&
ts
,
0
);
}
}
else
{
while
(
1
)
{
if
(
!
qp
->
lock
.
waiting
)
{
*
status
=
QCOM__SUCCESS
;
qdb_Lock
;
return
1
;
}
if
(
!
remaining_time
)
{
/* Timeout */
*
status
=
QCOM__TMO
;
qdb_Lock
;
return
0
;
}
if
(
remaining_time
<=
delta
)
{
ts
.
tv_nsec
=
remaining_time
*
1000000
;
remaining_time
=
0
;
}
else
{
ts
.
tv_nsec
=
delta
*
1000000
;
remaining_time
-=
delta
;
}
nanosleep
(
&
ts
,
0
);
}
}
return
0
;
}
#if 0
...
...
@@ -196,6 +259,19 @@ qos_SignalQueOld (
#endif
pwr_tStatus
qos_SignalQue
(
pwr_tStatus
*
status
,
qdb_sQue
*
qp
)
{
pwr_dStatus
(
sts
,
status
,
QCOM__SUCCESS
);
qp
->
lock
.
waiting
=
FALSE
;
return
TRUE
;
}
#if 0
pwr_tStatus
qos_SignalQue (
pwr_tStatus *status,
...
...
@@ -216,6 +292,7 @@ qos_SignalQue (
return TRUE;
}
#endif
qdb_sQlock
*
...
...
src/lib/rt/src/rt_plc_thread.c
View file @
ef5f65af
...
...
@@ -297,8 +297,8 @@ scan (
sem_wait
(
&
tp
->
ScanSem
);
#elif defined OS_MACOS
struct
timespec
ts
;
ts
.
tv_sec
=
tp
->
sync_time
.
tv_sec
;
ts
.
tv_nsec
=
tp
->
sync_time
.
tv_nsec
;
ts
.
tv_sec
=
delta
.
tv_sec
;
ts
.
tv_nsec
=
delta
.
tv_nsec
;
nanosleep
(
&
ts
,
NULL
);
#else
/* REMARK
...
...
src/lib/rt/src/rt_qdb.c
View file @
ef5f65af
...
...
@@ -1258,8 +1258,10 @@ qdb_AddQue (
pthread_condattr_setpshared
(
&
condattr
,
PTHREAD_PROCESS_SHARED
);
pthread_mutexattr_init
(
&
mutexattr
);
pthread_mutexattr_setpshared
(
&
mutexattr
,
PTHREAD_PROCESS_SHARED
);
pthread_mutex_init
(
&
qp
->
lock
.
mutex
,
&
mutexattr
);
pthread_cond_init
(
&
qp
->
lock
.
cond
,
&
condattr
);
if
(
pthread_mutex_init
(
&
qp
->
lock
.
mutex
,
&
mutexattr
)
!=
0
)
errh_Error
(
"pthread_mutex_init, errno %d"
,
errno
);
if
(
pthread_cond_init
(
&
qp
->
lock
.
cond
,
&
condattr
)
!=
0
)
errh_Error
(
"pthread_cond_init, errno %d"
,
errno
);
qp
=
hash_Insert
(
sts
,
&
qdb
->
qix_ht
,
qp
);
...
...
src/tools/bld/src/os_macos/exe_generic.mk
View file @
ef5f65af
...
...
@@ -136,7 +136,7 @@ realclean : clean $(clean_h_includes) $(clean_hpp_includes) clean_dirs
$(export_exe)
:
$(link_rule) $(export_obj) $(objects)
@
$(log_link_exe)
$(link)
@
$(link)
# This is for Lynx 2.5 map files, it doesn't work for Linux. ML
...
...
wb/exp/com/src/wb_wiz_directoryvolume.pwr_com
View file @
ef5f65af
...
...
@@ -146,6 +146,7 @@ main()
int found;
string oname;
string hw;
string os;
verify(0);
...
...
@@ -154,6 +155,7 @@ main()
dv_sim_qbus = get_pwr_config( "defaultSimulationQbus");
hw = GetHardware();
os = GetOpSys();
if ( ! EditMode())
MessageDialog("Error", "Enter edit mode before starting wizard");
...
...
@@ -542,11 +544,17 @@ page_4:
attr = name + ".NodeName";
SetAttribute( attr, node_name[i]);
attr = name + ".OperatingSystem";
if ( hw == "x86_64")
SetAttribute( attr, 128);
else
SetAttribute( attr, 64);
if ( os == "Linux")
if ( hw == "x86_64")
SetAttribute( attr, 128);
else
SetAttribute( attr, 64);
endif
endif
if ( os == "MacOS")
SetAttribute( attr, 256);
endif
attr = name + ".Address";
SetAttribute( attr, node_ip[i]);
if ( !node_disdistr[i])
...
...
wb/exp/com/src/wb_wiz_rootvolume.pwr_com
View file @
ef5f65af
...
...
@@ -54,6 +54,7 @@ main()
string oname;
string current_node;
string hw;
string os;
verify(0);
...
...
@@ -62,6 +63,7 @@ main()
rv_opmaintenance = get_pwr_config( "defaultOpMaintenance");
hw = GetHardware();
os = GetOpSys();
if ( ! EditMode())
MessageDialog("Error", "Enter edit mode before starting wizard");
...
...
@@ -132,10 +134,15 @@ page_4:
# Create objects
str1 = volume + ":";
if ( hw == "x86_64")
set attr/name='str1'/attr=OperatingSystem/value=128/nolog/noconf
else
set attr/name='str1'/attr=OperatingSystem/value=64/nolog/noconf
if ( os == "Linux")
if ( hw == "x86_64")
set attr/name='str1'/attr=OperatingSystem/value=128/nolog/noconf
else
set attr/name='str1'/attr=OperatingSystem/value=64/nolog/noconf
endif
endif
if ( os == "MacOS")
set attr/name='str1'/attr=OperatingSystem/value=256/nolog/noconf
endif
if ( rv_nodehierroot != "")
...
...
wb/lib/wb/src/wb_wccm.cpp
View file @
ef5f65af
...
...
@@ -1108,6 +1108,24 @@ static int wccm_stringtoobjectname_func(
return
1
;
}
static
int
wccm_getopsys_func
(
void
*
filectx
,
ccm_sArg
*
arg_list
,
int
arg_count
,
int
*
return_decl
,
ccm_tFloat
*
return_float
,
ccm_tInt
*
return_int
,
char
*
return_string
)
{
if
(
arg_count
!=
0
)
return
CCM__ARGMISM
;
strcpy
(
return_string
,
syi_OpSys
());
*
return_decl
=
CCM_DECL_STRING
;
return
1
;
}
static
int
wccm_gethardware_func
(
void
*
filectx
,
ccm_sArg
*
arg_list
,
...
...
@@ -1200,6 +1218,8 @@ int wccm_register(
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ccm_register_function
(
"GetHardware"
,
wccm_gethardware_func
);
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ccm_register_function
(
"GetOpSys"
,
wccm_getopsys_func
);
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ccm_create_external_var
(
"cmd_status"
,
CCM_DECL_INT
,
0
,
1
,
NULL
);
...
...
wb/lib/wb/src/wb_wtt.cpp
View file @
ef5f65af
...
...
@@ -772,7 +772,7 @@ int Wtt::set_edit()
case
ldh_cUserDatabaseVolume
:
// Privilege Administrator required
if
(
!
(
CoLogin
::
privilege
()
&
pwr_mPrv_Administrator
))
{
message
(
'E'
,
"User is not authorized to administrate"
);
message
(
'E'
,
"User is not authorized to administrate
. Login with command
\"
login/adm
\"
"
);
return
1
;
}
break
;
...
...
@@ -951,7 +951,7 @@ void Wtt::activate_print()
dcli_translate_filename
(
filename
,
filename
);
focused_wnav
->
print
(
filename
);
#if defined OS_LINUX
#if defined OS_LINUX
|| defined OS_MACOS
sprintf
(
cmd
,
"wb_gre_print.sh %s"
,
filename
);
sts
=
system
(
cmd
);
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment