Help - Trigger __trigger in sys/kernel.h problem

Although sys/kernel.h was included in this code, compiled with gcc, I’m
still getting warnings on using Target and __target. Apparenly, the code
doesn’t see the declarations of these two at all. To quickly get around
this, in order to compile the rest of the code, I wrote:

int Trigger(int x) { return -1;}
#define __trigger(x) Trigger

Granted, if I try running the executable with this hack, it crashes and
burns :wink:
Does anyone have any suggestions why the code may not be seeing the header
file, even though it’s included in the code apparently correctly?

Thanks!

Karen

in sys/kernel.h Trigger is a cover for __trigger … you shouldn’t need
to override this.

it is #def’d to make sure that 386 is set:

#ifdef __cplusplus
extern “C” {
#endif
#if defined(386)

blah…


so you need 386 defined


Karen <chibiusa@mtu.net> wrote:

Although sys/kernel.h was included in this code, compiled with gcc, I’m
still getting warnings on using Target and __target. Apparenly, the code
doesn’t see the declarations of these two at all. To quickly get around
this, in order to compile the rest of the code, I wrote:

int Trigger(int x) { return -1;}
#define __trigger(x) Trigger

Granted, if I try running the executable with this hack, it crashes and
burns > :wink:
Does anyone have any suggestions why the code may not be seeing the header
file, even though it’s included in the code apparently correctly?

Thanks!

Karen


Randy Martin randy@qnx.com
Manager of FAE Group, North America
QNX Software Systems www.qnx.com
175 Terence Matthews Crescent, Kanata, Ontario, Canada K2M 1W8
Tel: 613-591-0931 Fax: 613-591-3579

How exactly would I go about doing this? Do I have to explicitly defne it a
a cetain thing? Would I do this before or after including <sys/kernel.h> ?

When I currently try to compile, after removing my hack, I wind up with


make[2]: Entering directory /home/local/test2/lmbench-2alpha10-qnx/src' gcc -Wall -O -Dvalloc=malloc -o ../bin/ix86-qnx424k/lat_prx lat_prx.c .../bin/ix86-qnx424k/lmbench.a -lrpc -lsocket -luni x lat_prx.c: In function ctx’:
lat_prx.c:185: warning: implicit declaration of function Trigger' lat_prx.c: In function doit_cost’:
lat_prx.c:233: warning: `sum’ might be used uninitialized in this function
Warning(1028): Trigger is an undefined reference
file
/tmp/ccrGbmG6.o(//1/home/local/test2/lmbench-2alpha10-qnx/src/lat_prx.c):
undefined symbol Trigger
collect2: ld returned 1 exit status
…etc

Any further information would be greatly welcome.

Thank you for your time,

Karen

I’m trying to compile a verson of lmbench for qnx4, and I’m only 1 line
away.

“Randy Martin” <randy@qnx.com> wrote in message
news:9fo0t4$qqf$1@nntp.qnx.com

in sys/kernel.h Trigger is a cover for __trigger … you shouldn’t need
to override this.

it is #def’d to make sure that 386 is set:

#ifdef __cplusplus
extern “C” {
#endif
#if defined(386)

blah…


so you need 386 defined


Karen <> chibiusa@mtu.net> > wrote:
Although sys/kernel.h was included in this code, compiled with gcc, I’m
still getting warnings on using Target and __target. Apparenly, the code
doesn’t see the declarations of these two at all. To quickly get around
this, in order to compile the rest of the code, I wrote:

int Trigger(int x) { return -1;}
#define __trigger(x) Trigger

Granted, if I try running the executable with this hack, it crashes and
burns > :wink:
Does anyone have any suggestions why the code may not be seeing the
header
file, even though it’s included in the code apparently correctly?

Thanks!

Karen


\

Randy Martin > randy@qnx.com
Manager of FAE Group, North America
QNX Software Systems > www.qnx.com
175 Terence Matthews Crescent, Kanata, Ontario, Canada K2M 1W8
Tel: 613-591-0931 Fax: 613-591-3579

i use 2alpha8 … i don’t have a lat_prx in that version…

if you check the code, is there a function called Trigger in there?
check line 185 to see what is there in lat_prx.c

Karen <chibiusa@mtu.net> wrote:

How exactly would I go about doing this? Do I have to explicitly defne it a
a cetain thing? Would I do this before or after including <sys/kernel.h> ?

When I currently try to compile, after removing my hack, I wind up with


make[2]: Entering directory /home/local/test2/lmbench-2alpha10-qnx/src' gcc -Wall -O -Dvalloc=malloc -o ../bin/ix86-qnx424k/lat_prx lat_prx.c ../bin/ix86-qnx424k/lmbench.a -lrpc -lsocket -luni x lat_prx.c: In function ctx’:
lat_prx.c:185: warning: implicit declaration of function Trigger' lat_prx.c: In function doit_cost’:
lat_prx.c:233: warning: `sum’ might be used uninitialized in this function
Warning(1028): Trigger is an undefined reference
file
/tmp/ccrGbmG6.o(//1/home/local/test2/lmbench-2alpha10-qnx/src/lat_prx.c):
undefined symbol Trigger
collect2: ld returned 1 exit status
…etc

Any further information would be greatly welcome.

Thank you for your time,

Karen

I’m trying to compile a verson of lmbench for qnx4, and I’m only 1 line
away.

“Randy Martin” <> randy@qnx.com> > wrote in message
news:9fo0t4$qqf$> 1@nntp.qnx.com> …
in sys/kernel.h Trigger is a cover for __trigger … you shouldn’t need
to override this.

it is #def’d to make sure that 386 is set:

#ifdef __cplusplus
extern “C” {
#endif
#if defined(386)

blah…


so you need 386 defined


Karen <> chibiusa@mtu.net> > wrote:
Although sys/kernel.h was included in this code, compiled with gcc, I’m
still getting warnings on using Target and __target. Apparenly, the code
doesn’t see the declarations of these two at all. To quickly get around
this, in order to compile the rest of the code, I wrote:

int Trigger(int x) { return -1;}
#define __trigger(x) Trigger

Granted, if I try running the executable with this hack, it crashes and
burns > :wink:
Does anyone have any suggestions why the code may not be seeing the
header
file, even though it’s included in the code apparently correctly?

Thanks!

Karen


\

Randy Martin > randy@qnx.com
Manager of FAE Group, North America
QNX Software Systems > www.qnx.com
175 Terence Matthews Crescent, Kanata, Ontario, Canada K2M 1W8
Tel: 613-591-0931 Fax: 613-591-3579


Randy Martin randy@qnx.com
Manager of FAE Group, North America
QNX Software Systems www.qnx.com
175 Terence Matthews Crescent, Kanata, Ontario, Canada K2M 1W8
Tel: 613-591-0931 Fax: 613-591-3579