Feed for discussion OSTech in project QNX Operating System.Posts for OSTechpost102400: Re: Quiet version of the ipl-diskpc1Jacek Rudnickihttp://community.qnx.com/sf/go/post1024002013-06-18T20:47:53Z2013-06-18T20:47:53ZHi,
It works fine!!
Replacement of "0xCD 0x10" values at offset 0x153 with NOP, NOP did a trick.
We use a Power-Safe filesystem where the secondary bootloader can be tuned
with the use of mkqnx6fs utility:
mkqnx6fs -B -O+quiet /dev/hd0t179
Thank you,
JacekJacek Rudnicki2013-06-18T20:47:53Zpost102358: Re: Quiet version of the ipl-diskpc1Alexandre REBEKOhttp://community.qnx.com/sf/go/post1023582013-06-17T17:18:30Z2013-06-17T17:18:30ZHi,
generaly speaking your next question will be about ipl-diskpc2 ...
because the only thing, that the ipl-diskpc1 asks is the partition
to boot from:
"Press F1-F4 to select drive or select partition"
At the offset 0x153 of the ipl-diskpc1 you would see the "0xCD 0x10"
- this is a BIOS call "Write Character in TTY Mode".
Just patch with NOP, NOP ( 0x90,0x90)
Or, you can just put a zero (0x00) at 0x166 in place of 0x50 ('P')
So, the text string "Press F1-F4 to select drive or select partition\0"
will be "\0ress F1-F4 to select drive or select partition\0".
No output. Mission complete.
The ipl-diskpc2 is a bit complicated. But also doable same way.
Regards,
-- AlexandreAlexandre REBEKO2013-06-17T17:18:30Zpost102337: Re: Quiet version of the ipl-diskpc1Ivan Timakovhttp://community.qnx.com/sf/go/post1023372013-06-15T21:01:47Z2013-06-15T21:01:47ZUp. Same question.
Professors, help please.Ivan Timakov2013-06-15T21:01:47Zpost102167: Stepping by Instruction through child processEric Khttp://community.qnx.com/sf/go/post1021672013-06-11T17:16:00Z2013-06-11T17:16:00ZHello,
I'm wondering how you can go about stepping by instruction through a child process. I already have the child process being spawned with SPAWN_HOLD.
Then I send the DCMD_PROC_STOP flag to the process using devctl() and finally I send a SIGCONT signal to the process to get rid of the SIGSTOP that results from the SPAWN_HOLD.
After that I send DCMD_PROC_RUN flags to the process with the _DEBUG_RUN_STEP flag set.
I'm checking error codes and looking at the procfs_status structs each step of the way and everything looks reasonable aside from the instruction pointer. The instruction pointer is always around 17 million.
The problem arises after I tell the child process to step to the next instruction for the first time. The child process does not execute and instead just dies.
I have tested this setup without the stepping flag, and the child process runs fine so that leads me to believe that I am incorrectly stepping through.
Is there an initialization process with the stack or instruction pointer that I'm not aware of? Or have I been stepping through incorrectly the entire time?
My setup for the run flags is this:
procfs_run run;
memset(&run, 0, sizeof(run))
run.flags = 0 | _DEBUG_RUN_STEP
and then I'm calling the devctl function like this:
while( (retVal = devctl( fd, DCMD_PROC_RUN, &run, sizeof(run), NULL )) == EOK )
...
Thanks, EricEric K2013-06-11T17:16:00Zpost102050: ntpd vs. ntp.confTamer Uzhttp://community.qnx.com/sf/go/post1020502013-06-06T14:22:08Z2013-06-06T14:22:08Zntpd by default looks directly under /etc/ to find ntp.conf file. However ntp.conf file in QNX 6.5.0 distribution is located under /etc/ntp/ directory. Therefore, to be able to run ntpd succesfully I had to pass the conf file's location manually using -c switch. This needs to be fixed.Tamer Uz2013-06-06T14:22:08Zpost101715: RE: QDB server & database not foundChris Travishttp://community.qnx.com/sf/go/post1017152013-05-27T13:58:59Z2013-05-27T13:58:59ZIt's looking for libsqlite3.so.1 in your LD_LIBRARY_PATH . On my QNX650 HOST for some reason it is not in the /usr/lib directory...but you can find it in QNX_TARGET.
thor$ uname -a
QNX thor 6.5.0 2010/07/09-14:44:03EDT x86pc x86
thor$ which qdb
/usr/sbin/qdb
thor$ objdump -x /usr/sbin/qdb | grep NEEDED
NEEDED libsqlite3.so.1
NEEDED libz.so.2
NEEDED libc.so.3
thor$ which -sa libsqlite3.so.1
which: no libsqlite3.so.1 in :/proc/boot:/lib:/usr/lib:/lib/dll:/opt/lib:/usr/photon/lib:/usr/photon/dll:/usr/local/lib:/opt/X11R6/lib:/usr/X11R6/lib:/proc/boot
:/lib:/usr/lib:/lib/dll:/opt/lib
thor$ qdb
ldd:FATAL: Could not load library libsqlite3.so.1
thor$ find /usr -name "libsql*"
/usr/qnx650/target/qnx6/ppcbe-spe/usr/lib/libsqlite3.so
/usr/qnx650/target/qnx6/ppcbe-spe/usr/lib/libsqlite3.so.1
/usr/qnx650/target/qnx6/ppcbe/usr/lib/libsqlite3.so
/usr/qnx650/target/qnx6/ppcbe/usr/lib/libsqlite3.so.1
/usr/qnx650/target/qnx6/x86/usr/lib/libsqlite3.so
/usr/qnx650/target/qnx6/x86/usr/lib/libsqlite3.so.1
/usr/qnx650/target/qnx6/armle-v7/usr/lib/libsqlite3.so
/usr/qnx650/target/qnx6/armle-v7/usr/lib/libsqlite3.so.1
/usr/qnx650/target/qnx6/armle/usr/lib/libsqlite3.so
/usr/qnx650/target/qnx6/armle/usr/lib/libsqlite3.so.1
/usr/qnx650/target/qnx6/shle/usr/lib/libsqlite3.so
/usr/qnx650/target/qnx6/shle/usr/lib/libsqlite3.so.1
thor$ ls -l */usr/lib/libsqlite3.so*
ls: No such file or directory (*/usr/lib/libsqlite3.so*)
thor$ use -i /usr/qnx650/target/qnx6/x86/usr/lib/libsqlite3.so.1
NAME=libsqlite3.so
DESCRIPTION=SQLite Library
DATE=2010/07/09-13:23:07-EDT
STATE=stable
HOST=mainbuild
USER=builder
VERSION=6.5.0
TAGID=89
thor$ echo $QNX_TARGET
/usr/qnx650/target/qnx6
thor$ echo $LD_LIBRARY_PATH
:/proc/boot:/lib:/usr/lib:/lib/dll:/opt/lib:/usr/photon/lib:/usr/photon/dll:/usr/local/lib:/opt/X11R6/lib:/usr/X11R6/lib
thor$ which -sa libsqlite3.so.1
which: no libsqlite3.so.1 in :/proc/boot:/lib:/usr/lib:/lib/dll:/opt/lib:/usr/photon/lib:/usr/photon/dll:/usr/local/l
ib:/opt/X11R6/lib:/usr/X11R6/lib:/usr/qnx650/target/qnx6/usr/lib:/proc/boot:/lib:/usr/lib:/lib/dll:/opt/lib
thor$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/qnx650/target/qnx6/x86/usr/lib
thor$ which -sa libsqlite3.so.1
/usr/qnx650/target/qnx6/x86/usr/lib/libsqlite3.so.1
thor$ qdb
qdb: must be superuser to start server
-----Original Message-----
From: Jian Rong Yong [mailto:community-noreply@qnx.com]
Sent: May-26-13 9:49 PM
To: ostech-core_os
Subject: Re: QDB server & database not found
Hi,
i tried starting qdb following the instruction under the help section but it replies me with a "Idd:FATAL: Could not load library libsqlite3.so.1". Any advise on how to fix this error?
Thanks,
Jian Rong
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post101698
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comChris Travis2013-05-27T13:58:59Zpost101698: Re: QDB server & database not foundJian Rong Yonghttp://community.qnx.com/sf/go/post1016982013-05-27T01:48:49Z2013-05-27T01:48:49ZHi,
i tried starting qdb following the instruction under the help section but it replies me with a "Idd:FATAL: Could not load library libsqlite3.so.1". Any advise on how to fix this error?
Thanks,
Jian RongJian Rong Yong2013-05-27T01:48:49Zpost101603: Re: QDB server & database not foundDennis Kelllyhttp://community.qnx.com/sf/go/post1016032013-05-22T15:26:38Z2013-05-22T15:26:38ZThe reference example not real specific, but you need create file /db/customerdb.cfg as the text between dashes-
-------
[customerdb]
Filename=/db/customerdb
Schema File=/db/customerdb.sql
/db/customerdb.sql:
CREATE TABLE customers(
custoemrid INTEGER PRIMARY KEY AUTOINCREMENT,
firstname TEXT,
lastname TEXT
)
-------
Then start qdb as...
# qdb -c /db/qdb.cfg -vvvvvv -otempstore=/tmp -Rauto -A
If it succeeds, you should see...
QDB: created missing database customerdb
and /dev/qdb/customerdb will exist.Dennis Kellly2013-05-22T15:26:38Zpost101602: Re: QDB server & database not foundRyan Allenhttp://community.qnx.com/sf/go/post1016022013-05-22T15:16:38Z2013-05-22T15:16:38ZRead through the "Starting QDB" section of the documentation here:
http://www.qnx.com/developers/docs/6.5.0_sp1/topic/com.qnx.doc.qdb_en_dev_g
uide/starting.html?cp=2_0_2
This will help you to start the qdb server. When this is running you will
see your configured databases in /dev/qdb/ (use "ls /dev/qdb/" to see).
If you do not see /dev/qdb/ please confirm that qdb started successfully;
if you do not see your database name listed please confirm that it is
properly configured (start qdb with "-vvvvv" and check "sloginfo" for an
error messages).
If qdb is running you can use the qdb_*() APIs in an application to
interact with qdb; you can also use the command-line utility "qdbc". Qdbc
is primarily used to run SQL statements on your database:
http://www.qnx.com/developers/docs/6.5.0_sp1/topic/com.qnx.doc.qdb_en_dev_g
uide/qdbc.html?cp=2_0_3
--
Ryan J. Allen
QNX Software Systems
On 13-05-19 9:08 PM, "Jian Rong Yong" <community-noreply@qnx.com> wrote:
>Hi,
>i have read about the qdb server under the help section and i have no
>clue on how to interact with it. Also when i use qdb_connect() to connect
>to the database, it replied with a "No such path or directory".
>please advise.
>
>Thanks,
>Jian RongRyan Allen2013-05-22T15:16:38Zpost101551: QDB server & database not foundJian Rong Yonghttp://community.qnx.com/sf/go/post1015512013-05-20T01:08:53Z2013-05-20T01:08:53ZHi,
i have read about the qdb server under the help section and i have no clue on how to interact with it. Also when i use qdb_connect() to connect to the database, it replied with a "No such path or directory".
please advise.
Thanks,
Jian RongJian Rong Yong2013-05-20T01:08:53Zpost101541: Quiet version of the ipl-diskpc1Jacek Rudnickihttp://community.qnx.com/sf/go/post1015412013-05-17T20:55:58Z2013-05-17T20:55:58ZHi,
I need version of the ipl-diskpc1 which doesn't print anything on the screen.
Where can I find source code of this bootloader ?
Regards,
JacekJacek Rudnicki2013-05-17T20:55:58Zpost101537: Re: USB drive detection on startupGervais Mulongoyhttp://community.qnx.com/sf/go/post1015372013-05-17T17:08:44Z2013-05-17T17:08:44ZI could have also been a bit more clear in my mention of "shared access"
- glad you got it sorted out though.Gervais Mulongoy2013-05-17T17:08:44Zpost101535: Re: USB drive detection on startupGervais Mulongoyhttp://community.qnx.com/sf/go/post1015352013-05-17T17:07:56Z2013-05-17T17:07:56ZThanks - this is good to know as I usually just looped as the
documentation described.Gervais Mulongoy2013-05-17T17:07:56Zpost101529: RE: USB drive detection on startupLichun Zhuhttp://community.qnx.com/sf/go/post1015292013-05-17T15:52:30Z2013-05-17T15:52:30ZRight, someone already attached to it, you just need readonly connection,
By the way, a more efficiency approach is to do single one call for each bus
extern int usbd_topology_ext(struct usbd_connection *connection, _Uint8t busno, usbd_bus_topology_t *tp);
and exam the tp from devno 1 to 63. if upstream_devno is 0 or 0xff, then there is no device on that devno.
-----Original Message-----
From: Robert Murrell [mailto:community-noreply@qnx.com]
Sent: Friday, May 17, 2013 11:48 AM
To: ostech-core_os
Subject: Re: USB drive detection on startup
If you carefully read the documentation, you might just do the right thing I changed my code from this:
parms.funcs = &funcs;
to this:
parms.funcs = NULL;
and it is working.
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post101528
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comLichun Zhu2013-05-17T15:52:30Zpost101528: Re: USB drive detection on startupRobert Murrellhttp://community.qnx.com/sf/go/post1015282013-05-17T15:47:57Z2013-05-17T15:47:57ZIf you carefully read the documentation, you might just do the right thing I changed my code from this:
parms.funcs = &funcs;
to this:
parms.funcs = NULL;
and it is working.Robert Murrell2013-05-17T15:47:57Zpost101526: Re: USB drive detection on startupRobert Murrellhttp://community.qnx.com/sf/go/post1015262013-05-17T15:32:59Z2013-05-17T15:32:59ZBase on your suggestion and the example code in the docs, I wrote this test program:
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <sys/usbdi.h>
int main(int argc, char *argv[]) {
int rc;
usbd_connect_parm_t parms;
struct usbd_connection *connection;
usbd_device_ident_t ident;
usbd_funcs_t funcs;
usbd_device_instance_t instance;
struct usbd_device *device;
usbd_device_descriptor_t *descriptor;
struct usbd_desc_node *node;
memset(&parms, 0, sizeof(parms));
memset(&funcs, 0, sizeof(funcs));
funcs.nentries = _USBDI_NFUNCS;
ident.vendor = USBD_CONNECT_WILDCARD;
ident.device = USBD_CONNECT_WILDCARD;
ident.dclass = USBD_CONNECT_WILDCARD;
ident.subclass = USBD_CONNECT_WILDCARD;
ident.protocol = USBD_CONNECT_WILDCARD;
parms.vusb = USB_VERSION;
parms.vusbd = USBD_VERSION;
parms.ident = &ident;
parms.funcs = &funcs;
parms.connect_wait = 2;
if ((rc = usbd_connect(&parms, &connection)) == EOK) {
//attach to USB0
int busno;
int devno;
for (busno = 0; busno < 10; ++busno) {
for (devno = 0; devno < 64; ++devno) {
memset(&instance, USBD_CONNECT_WILDCARD, sizeof(instance));
instance.path = busno;
instance.devno = devno;
if ((rc = usbd_attach(connection, &instance, 0, &device)) == EOK) {
if ((descriptor = usbd_device_descriptor(device, &node)) != NULL) {
printf("Found device\n");
}
} else {
printf("Bus %d device %d: %s\n", busno, devno, strerror(rc));
}
}
}
rc = usbd_disconnect(connection);
}
return EXIT_SUCCESS;
}
All calls to usbd_attach return ENODEV, except the call for busno = 0 and devno = 1. That call returns EBUSY. I have a USB drive plugged in and the values corresponds to the report given by "usb". What am I doing wrong?
> You could do a shared access scan for the device by connecting
> (usbd_connect())to the USB server but not providing any callbacks and
> setting the device ident to use wildcards. You then use usbd_attach() to
> loop through all the devices (see usbd_attach() docs for notes on
> "Looping") and check the instance of the attached device for a dclass of
> 0x06, a subclass of 0x08 and maybe even a protocol of 0x50 (that's what
> usb -vv showed for my umass device, your mileage will vary though). You
> could then increment a counter to track how many umass devices are
> plugged in at the time or just bail out at that point and return status
> to your script etc.
>Robert Murrell2013-05-17T15:32:59Zpost101520: Re: USB drive detection on startupRobert Murrellhttp://community.qnx.com/sf/go/post1015202013-05-17T13:22:06Z2013-05-17T13:22:06ZThanks. I didn't know this interface existed. This might be just what I'm looking for.Robert Murrell2013-05-17T13:22:06Zpost101517: Re: USB drive detection on startupGervais Mulongoyhttp://community.qnx.com/sf/go/post1015172013-05-17T12:58:39Z2013-05-17T12:58:39ZYou could do a shared access scan for the device by connecting
(usbd_connect())to the USB server but not providing any callbacks and
setting the device ident to use wildcards. You then use usbd_attach() to
loop through all the devices (see usbd_attach() docs for notes on
"Looping") and check the instance of the attached device for a dclass of
0x06, a subclass of 0x08 and maybe even a protocol of 0x50 (that's what
usb -vv showed for my umass device, your mileage will vary though). You
could then increment a counter to track how many umass devices are
plugged in at the time or just bail out at that point and return status
to your script etc.
On 05/17/2013 08:31 AM, Robert Murrell wrote:
> That last question should be is there any way to detect that there is no USB drive installed versus one that is installed but hasn't been mounted yet?
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post101515
> To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comGervais Mulongoy2013-05-17T12:58:39Zpost101516: Re: USB drive detection on startupDennis Kelllyhttp://community.qnx.com/sf/go/post1015162013-05-17T12:34:52Z2013-05-17T12:34:52ZCan you call the "usb" utility and grep the output for the enumeration list? Linst hould contain your usb drive OR not.Dennis Kellly2013-05-17T12:34:52Zpost101515: Re: USB drive detection on startupRobert Murrellhttp://community.qnx.com/sf/go/post1015152013-05-17T12:31:10Z2013-05-17T12:31:10ZThat last question should be is there any way to detect that there is no USB drive installed versus one that is installed but hasn't been mounted yet?Robert Murrell2013-05-17T12:31:10Zpost101514: USB drive detection on startupRobert Murrellhttp://community.qnx.com/sf/go/post1015142013-05-17T12:27:48Z2013-05-17T12:27:48ZWe are using QNX 6.5.0 with a minimal configuration in an embedded system. Our application has the requirement that if it powers up with a USB drive plugged in, we look for a file with a specific signature, an if it exists, we execute it instead of the installed application. We use this feature for fault recovery and debugging. We execute the following in the image script before our application is executed:
# USB port support
io-usb -dehci -dohci -duhci &
waitfor /dev/io-usb/io-usb
devb-umass cam pnp blk noatime disk name=umass cdrom name=umasscd &
# Start the automounter
/usr/sbin/mcd -v /etc/mcd.conf
Our startup program blindly waits two seconds before checking the USB drive for files. This is to give time for the automounter to detect and mount the drive. I found a USB drive that take just over two seconds for the automounter to detect, so they do not get detected in time. I can extend this wait time to accommodate it, but I do not like this dead time in our startup and would like to make it more intelligent.
I can monitor in a timed loop to detect the presence of a USB drive earlier, but it would still wait the full timeout if no USB drive is inserted. What I need is a way to detect that there is no drive inserted and then skip the check. Is there any way to detect that there is no drive installed that hasn't been mounted yet?Robert Murrell2013-05-17T12:27:48Zpost101440: Re: cannot find -llibqdb.soRyan Allenhttp://community.qnx.com/sf/go/post1014402013-05-15T12:47:56Z2013-05-15T12:47:56ZTry specifying the additional library as "qdb"--this should add "-l qdb"
to the linker arguments. The linker will surround this with "libqdb.so"
and search for that.
If this fails, check to make sure that libqdb.so is in your $QNX_TARGET
directory.
--
Ryan J. Allen
QNX Software Systems
On 13-05-14 10:24 PM, "Jian Rong Yong" <community-noreply@qnx.com> wrote:
>Hi i'm a student trying to work with a embedded database, i have added
>the extra library(libqdb.so) under the project properties/Linker.
>however, when i build the project, it still gives me the cannot find
>-llibqdb.so error. Please advise.
>
>thanks,
>Jian RongRyan Allen2013-05-15T12:47:56Zpost101425: cannot find -llibqdb.soJian Rong Yonghttp://community.qnx.com/sf/go/post1014252013-05-15T02:24:22Z2013-05-15T02:24:22ZHi i'm a student trying to work with a embedded database, i have added the extra library(libqdb.so) under the project properties/Linker. however, when i build the project, it still gives me the cannot find -llibqdb.so error. Please advise.
thanks,
Jian RongJian Rong Yong2013-05-15T02:24:22Zpost101168: Re: Sata on p1022, QorIqPhilippe ELSKENShttp://community.qnx.com/sf/go/post1011682013-05-06T12:44:19Z2013-05-06T12:44:19ZIt seems the latest release bring us a new driver : devb-fslSata .
Does anyone use it ?Philippe ELSKENS2013-05-06T12:44:19Zpost101086: Re: Are abstract sockets supported by qnx?Marck Frenchhttp://community.qnx.com/sf/go/post1010862013-05-02T14:35:18Z2013-05-02T14:35:18ZThanks very much for the fast reply. And answer. ! :-)
(this thread may be closed now).Marck French2013-05-02T14:35:18Zpost101079: Re: Are abstract sockets supported by qnx?Sean Boudreauhttp://community.qnx.com/sf/go/post1010792013-05-02T12:00:50Z2013-05-02T12:00:50ZThey are in the next release. Ask your sales rep if you want a preview.
-seanb
From: Marck French
Sent: Thursday, May 2, 2013 4:12 AM
To: ostech-core_os
Reply To: ostech-core_os@community.qnx.com
Subject: Are abstract sockets supported by qnx?
Greetings,
we develop a few applications which are ported to various hardware-platforms. On one of these platforms Qnx is running.
Our code uses "abstract sockets" and does not work under Qnx. When we try to "bind" an abstrackt socket we get an error (2 : path or file not found).
We triple checked the code and libraries and tried a lot of things, but we just can't get an abstract socket to work. We could not find documentation stating that they are not supported (nor that they are) in qnx.
So, the question is: are "abstract sockets" supported on qnx?
grtz,
Marck
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post101075
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comSean Boudreau2013-05-02T12:00:50Zpost101075: Are abstract sockets supported by qnx?Marck Frenchhttp://community.qnx.com/sf/go/post1010752013-05-02T08:11:54Z2013-05-02T08:11:54ZGreetings,
we develop a few applications which are ported to various hardware-platforms. On one of these platforms Qnx is running.
Our code uses "abstract sockets" and does not work under Qnx. When we try to "bind" an abstrackt socket we get an error (2 : path or file not found).
We triple checked the code and libraries and tried a lot of things, but we just can't get an abstract socket to work. We could not find documentation stating that they are not supported (nor that they are) in qnx.
So, the question is: are "abstract sockets" supported on qnx?
grtz,
MarckMarck French2013-05-02T08:11:54Zpost100727: Sata on p1022, QorIqPhilippe ELSKENShttp://community.qnx.com/sf/go/post1007272013-04-18T12:56:34Z2013-04-18T12:56:34ZHello,
Does anybody knows if QNX 6.5 support the integrated sata interface on QorIq family ?
and in this case what's the driver to start (devb- ?)
Thanks,
Philippe.Philippe ELSKENS2013-04-18T12:56:34Zpost100670: QorIQ, e500 : Supervisor-Level Registers Access.Philippe ELSKENShttp://community.qnx.com/sf/go/post1006702013-04-17T07:45:55Z2013-04-17T07:45:55ZHello folks,
Does anyone know how to access this set of registers ?
for instance how to program the wathdog register (enable and then refresh) on QorIq ?
I guess mtspr or mfspr instructions throw exceptions in a user-level process don't they ?
PhilippePhilippe ELSKENS2013-04-17T07:45:55Zpost100433: Re: RE: Which dynamic libraries is actually loaded by process XPer Kristoffersenhttp://community.qnx.com/sf/go/post1004332013-04-10T11:54:47Z2013-04-10T11:54:47ZThanx - that seems to do the trick.Per Kristoffersen2013-04-10T11:54:47Zpost100432: RE: Which dynamic libraries is actually loaded by process XAndrew Sherkhttp://community.qnx.com/sf/go/post1004322013-04-10T11:46:53Z2013-04-10T11:46:53ZYou could try "pidin mem"
Andy
-----Original Message-----
From: Per Kristoffersen [mailto:community-noreply@qnx.com]
Sent: Wednesday, April 10, 2013 7:46 AM
To: ostech-core_os
Subject: Which dynamic libraries is actually loaded by process X
Is there any way of telling (listing) the libraries loaded by a process.
objdump -x only lists the libraries linked to the process - but I'm looking for a tool that lists the dynamic libraries actually loaded be a running process.
Any ideas / hints / tips?
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post100431
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comAndrew Sherk2013-04-10T11:46:53Zpost100431: Which dynamic libraries is actually loaded by process XPer Kristoffersenhttp://community.qnx.com/sf/go/post1004312013-04-10T11:46:23Z2013-04-10T11:46:23ZIs there any way of telling (listing) the libraries loaded by a process.
objdump -x only lists the libraries linked to the process - but I'm looking for a tool that lists the dynamic libraries actually loaded be a running process.
Any ideas / hints / tips?Per Kristoffersen2013-04-10T11:46:23Zpost100420: memory barrier on arm when Enable IrqXiongwei Huanghttp://community.qnx.com/sf/go/post1004202013-04-10T05:04:21Z2013-04-10T05:04:21ZHi all
I still wonder about on Arm smp platform , Do QNX need a memory barrier ?
On x86 platform, this is the code
# define __inline_InterruptEnable() \
((void)({ \
__asm__ __volatile__ ( \
"sti" \
: : : "memory"); \
}))
but on Arm platform , seems no memory barrier
static __inline__ void __attribute__((__unused__))
__inline_InterruptEnable(void)
{
if (__cpu_flags & __ARM_CPU_FLAG_V6) {
__asm__ __volatile__("cpsie i");
} else {
unsigned __tmp;
__asm__ __volatile__(
"mrs %0, cpsr;"
"bic %0, %0, #0x80;"
"msr cpsr, %0;"
: "=r" (__tmp)
);
}
}
only in this will have the dmb instruction
static __inline__ void __attribute__((__unused__))
__inline_InterruptLock(struct intrspin *__spin)
{
__inline_InterruptDisable();
if (__cpu_flags & __ARM_CPU_FLAG_SMP) {
volatile unsigned val;
unsigned tmp;
__asm__ __volatile__(
"0: ldrex %0, [%3];"
" teq %0, #0;"
" wfene;"
" strexeq %1, %2, [%3];"
" teqeq %1, #0;"
" bne 0b;"
: "=&r" (val), "=&r"(tmp)
: "r" (1), "r" (&__spin->value)
);
if (__cpu_flags & __ARM_CPU_FLAG_V7) {
__asm__ __volatile__("dmb");
} else {
__asm__ __volatile__("mcr p15, 0, %0, c7, c10, 4" : : "r"(0));
}
}
}
Is there any special reason for this ?
And on Linux platform ,when enable irq ,always have a memory barrier
http://lxr.linux.no/linux+v3.8.6/arch/arm/include/asm/irqflags.h
Why QNX dont need this ?
Thanks and regardsXiongwei Huang2013-04-10T05:04:21Zpost100215: AW: Re: AW: Re: RE: Problem with slinger crashing.Thomas Haupthttp://community.qnx.com/sf/go/post1002152013-03-28T05:31:37Z2013-03-28T05:31:37ZYou can also set a breakpoint on exit(), to see if it terminates deliberately. If it does, take a bacltrace...
- Thomas
----- Originalnachricht -----
Von: Todd Peterson [mailto:community-noreply@qnx.com]
Gesendet: Wednesday, March 27, 2013 07:24 PM
An: ostech-core_os <ostech-core_os@community.qnx.com>
Betreff: Re: AW: Re: RE: Problem with slinger crashing.
The newer version exits as well. No dump produced or diagnostics in syslog. Nothing gets printed to console window. Are there 'normal' exit conditions? If so, could these be instrumented to print a message of some sort? For now, I wrote a script that checks if slinger is running every 5 secs and restarts if it isn't. Ugly way to do it.
> Thomas,
> I think I had a version 6.4.0 of slinger running. md5sum did not match slinger
> in my 6.4.1 development environment (28dac151ff397d6d8537d78634552798). It
> was crashing after about 20 min, it has been running todat for well over an
> hour.
> Thanks for your help.
> Todd
>
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post100212
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comThomas Haupt2013-03-28T05:31:37Zpost100213: Re: AW: Re: RE: Problem with slinger crashing.Sean Boudreauhttp://community.qnx.com/sf/go/post1002132013-03-27T23:29:59Z2013-03-27T23:29:59ZAttach to it with gdb and let it run. gdb may print if it's being hit with a signal.
Sent from my BlackBerry 10 smartphone.
From: Todd Peterson
Sent: Wednesday, March 27, 2013 7:24 PM
To: ostech-core_os
Reply To: ostech-core_os@community.qnx.com
Subject: Re: AW: Re: RE: Problem with slinger crashing.
The newer version exits as well. No dump produced or diagnostics in syslog. Nothing gets printed to console window. Are there 'normal' exit conditions? If so, could these be instrumented to print a message of some sort? For now, I wrote a script that checks if slinger is running every 5 secs and restarts if it isn't. Ugly way to do it.
> Thomas,
> I think I had a version 6.4.0 of slinger running. md5sum did not match slinger
> in my 6.4.1 development environment (28dac151ff397d6d8537d78634552798). It
> was crashing after about 20 min, it has been running todat for well over an
> hour.
> Thanks for your help.
> Todd
>
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post100212
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comSean Boudreau2013-03-27T23:29:59Zpost100212: Re: AW: Re: RE: Problem with slinger crashing.Todd Petersonhttp://community.qnx.com/sf/go/post1002122013-03-27T23:24:01Z2013-03-27T23:24:01ZThe newer version exits as well. No dump produced or diagnostics in syslog. Nothing gets printed to console window. Are there 'normal' exit conditions? If so, could these be instrumented to print a message of some sort? For now, I wrote a script that checks if slinger is running every 5 secs and restarts if it isn't. Ugly way to do it.
> Thomas,
> I think I had a version 6.4.0 of slinger running. md5sum did not match slinger
> in my 6.4.1 development environment (28dac151ff397d6d8537d78634552798). It
> was crashing after about 20 min, it has been running todat for well over an
> hour.
> Thanks for your help.
> Todd
>Todd Peterson2013-03-27T23:24:01Zpost100207: Re: AW: Re: RE: Problem with slinger crashing.Sean Boudreauhttp://community.qnx.com/sf/go/post1002072013-03-27T17:37:01Z2013-03-27T17:37:01ZTry bozohttp.
Builds from pkgsrc and is tiny.
On Wed, Mar 27, 2013 at 01:35:00PM -0400, Todd Peterson wrote:
> Thomas,
> I think I had a version 6.4.0 of slinger running. md5sum did not match slinger in my 6.4.1 development environment (28dac151ff397d6d8537d78634552798). It was crashing after about 20 min, it has been running todat for well over an hour.
> Thanks for your help.
> Todd
> P.S. Is there any plan for an https version of slinger? We have been developing one, but it is a pain in the butt starting from scratch.
>
> > Hi Todd,
> >
> > Please do so. I'm rather curious.
> >
> > Cheers,
> > Thomas
> >
> > ----- Originalnachricht -----
> > Von: Todd Peterson [mailto:community-noreply@qnx.com]
> > Gesendet: Wednesday, March 27, 2013 10:05 AM
> > An: ostech-core_os <ostech-core_os@community.qnx.com>
> > Betreff: Re: RE: Problem with slinger crashing.
> >
> > We are using 6.4.1. I see in release notes that your bug fixes should be there
> > . Besides, I am sure that it is not the too long query string bug. I will try
> > the dumper command to see what I get.
> > Thanks,
> > Todd
> > > Hi Todd,
> > >
> > > unfortunately, we cannot provide source code any more. The fix I made back
> > > then should long be in the product; I checked it in on Wed, Feb 11 2009, at
> > 16
> > > :20:48. It it thus part of all releases at least since 6.5.0.
> > >
> > > What version of QNX Neutrino are you running? If it's < 6.5.0, I can probably build you an experimental binary with my patch applied, if it is >= 6.5.0, then you are
> >
> > > probably facing a different bug. In the latter case, I'd need a core file,
> > or
> > > an exact description for how to reproduce the issue, or both.
> > >
> > > Kind regards,
> > > Thomas
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> >
> > OSTech
> > http://community.qnx.com/sf/go/post100201
> > To cancel your subscription to this discussion, please e-mail ostech-core_os-
> > unsubscribe@community.qnx.com
>
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post100206
> To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comSean Boudreau2013-03-27T17:37:01Zpost100206: Re: AW: Re: RE: Problem with slinger crashing.Todd Petersonhttp://community.qnx.com/sf/go/post1002062013-03-27T17:35:00Z2013-03-27T17:35:00ZThomas,
I think I had a version 6.4.0 of slinger running. md5sum did not match slinger in my 6.4.1 development environment (28dac151ff397d6d8537d78634552798). It was crashing after about 20 min, it has been running todat for well over an hour.
Thanks for your help.
Todd
P.S. Is there any plan for an https version of slinger? We have been developing one, but it is a pain in the butt starting from scratch.
> Hi Todd,
>
> Please do so. I'm rather curious.
>
> Cheers,
> Thomas
>
> ----- Originalnachricht -----
> Von: Todd Peterson [mailto:community-noreply@qnx.com]
> Gesendet: Wednesday, March 27, 2013 10:05 AM
> An: ostech-core_os <ostech-core_os@community.qnx.com>
> Betreff: Re: RE: Problem with slinger crashing.
>
> We are using 6.4.1. I see in release notes that your bug fixes should be there
> . Besides, I am sure that it is not the too long query string bug. I will try
> the dumper command to see what I get.
> Thanks,
> Todd
> > Hi Todd,
> >
> > unfortunately, we cannot provide source code any more. The fix I made back
> > then should long be in the product; I checked it in on Wed, Feb 11 2009, at
> 16
> > :20:48. It it thus part of all releases at least since 6.5.0.
> >
> > What version of QNX Neutrino are you running? If it's < 6.5.0, I can probably build you an experimental binary with my patch applied, if it is >= 6.5.0, then you are
>
> > probably facing a different bug. In the latter case, I'd need a core file,
> or
> > an exact description for how to reproduce the issue, or both.
> >
> > Kind regards,
> > Thomas
>
>
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post100201
> To cancel your subscription to this discussion, please e-mail ostech-core_os-
> unsubscribe@community.qnx.comTodd Peterson2013-03-27T17:35:00Zpost100204: AW: Re: RE: Problem with slinger crashing.Thomas Haupthttp://community.qnx.com/sf/go/post1002042013-03-27T15:06:31Z2013-03-27T15:06:31ZHi Todd,
Please do so. I'm rather curious.
Cheers,
Thomas
----- Originalnachricht -----
Von: Todd Peterson [mailto:community-noreply@qnx.com]
Gesendet: Wednesday, March 27, 2013 10:05 AM
An: ostech-core_os <ostech-core_os@community.qnx.com>
Betreff: Re: RE: Problem with slinger crashing.
We are using 6.4.1. I see in release notes that your bug fixes should be there. Besides, I am sure that it is not the too long query string bug. I will try the dumper command to see what I get.
Thanks,
Todd
> Hi Todd,
>
> unfortunately, we cannot provide source code any more. The fix I made back
> then should long be in the product; I checked it in on Wed, Feb 11 2009, at 16
> :20:48. It it thus part of all releases at least since 6.5.0.
>
> What version of QNX Neutrino are you running? If it's < 6.5.0, I can probably build you an experimental binary with my patch applied, if it is >= 6.5.0, then you are
> probably facing a different bug. In the latter case, I'd need a core file, or
> an exact description for how to reproduce the issue, or both.
>
> Kind regards,
> Thomas
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post100201
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comThomas Haupt2013-03-27T15:06:31Zpost100203: rmat - file formatFranz Brandelhttp://community.qnx.com/sf/go/post1002032013-03-27T14:44:56Z2013-03-27T14:44:56ZHello,
I was just wondering, if there is a complete description of the rmat - file format available.
It is possible to reverse engineer parts of it, but it would be helpful for me to have a complete description.
Any help apreciated.
Kindest Regards,
Franz BrandelFranz Brandel2013-03-27T14:44:56Zpost100201: Re: RE: Problem with slinger crashing.Todd Petersonhttp://community.qnx.com/sf/go/post1002012013-03-27T14:05:26Z2013-03-27T14:05:26ZWe are using 6.4.1. I see in release notes that your bug fixes should be there. Besides, I am sure that it is not the too long query string bug. I will try the dumper command to see what I get.
Thanks,
Todd
> Hi Todd,
>
> unfortunately, we cannot provide source code any more. The fix I made back
> then should long be in the product; I checked it in on Wed, Feb 11 2009, at 16
> :20:48. It it thus part of all releases at least since 6.5.0.
>
> What version of QNX Neutrino are you running? If it's < 6.5.0, I can probably build you an experimental binary with my patch applied, if it is >= 6.5.0, then you are
> probably facing a different bug. In the latter case, I'd need a core file, or
> an exact description for how to reproduce the issue, or both.
>
> Kind regards,
> ThomasTodd Peterson2013-03-27T14:05:26Zpost100197: Re: Problem with slinger crashing.Gervais Mulongoyhttp://community.qnx.com/sf/go/post1001972013-03-27T11:45:58Z2013-03-27T11:45:58ZHello Todd,
You can always start dumper to point to another directory (option -d i
believe), such as /tmp or /dev/shmem and collect the core file there.
GervaisGervais Mulongoy2013-03-27T11:45:58Zpost100192: Re: RE: Problem with slinger crashing.Thomas Haupthttp://community.qnx.com/sf/go/post1001922013-03-27T06:15:42Z2013-03-27T06:15:42ZHi Todd,
unfortunately, we cannot provide source code any more. The fix I made back then should long be in the product; I checked it in on Wed, Feb 11 2009, at 16:20:48. It it thus part of all releases at least since 6.5.0.
What version of QNX Neutrino are you running? If it's < 6.5.0, I can probably build you an experimental binary with my patch applied, if it is >= 6.5.0, then you are probably facing a different bug. In the latter case, I'd need a core file, or an exact description for how to reproduce the issue, or both.
Kind regards,
ThomasThomas Haupt2013-03-27T06:15:42Zpost100189: Re: RE: Problem with slinger crashing.Todd Petersonhttp://community.qnx.com/sf/go/post1001892013-03-26T23:51:35Z2013-03-26T23:51:35ZThomas,
We have a similar problem, but on the ARM platform. Could you provide the source code for your experimental version of slinger? Or the executable for ARM? We get no dump file, since our image does not have a /var/dumps directory. We do not get a syslog message either. No message in console window either.
Thanks,
Todd
> Hi Greg,
>
> you're right - there is yet another, more serious problem. It is caused by an
> HTTP GET request with a long query string - in your case, the query string by
> itself is already 520 characters long.
>
> While this doesn't cause a buffer overflow, it invokes a code path in slinger
> that's obviously supposed to prevent query strings longer than 256 characters
> from being passed to the cgi script as a command line argument. Unfortunately,
> this code path forgets to append a NULL to the argv[] vector that's later
> used to run the script...
>
> Below you can see the URL that must have been referred to when the crash
> occured; try to access it -- it should crash slinger right away, given I got
> the IP, path and script name right.
>
> http://10.0.5.195/cgi-bin/TF2000cmd?COMMAND=EXPORT_SHMEM_XML&QUAD=0&rndval=
> 1233936626477COMMAND=EXPORT_SHMEM_XML&QUAD=0&rndval=1233936631312COMMAND=
> EXPORT_SHMEM_XML&QUAD=0&rndval=1233936633946COMMAND=EXPORT_SHMEM_XML&QUAD=0&
> rndval=1233936635949COMMAND=EXPORT_SHMEM_XML&QUAD=0&rndval=
> 1233936637949COMMAND=EXPORT_SHMEM_XML&QUAD=0&rndval=1233936640128COMMAND=
> EXPORT_SHMEM_XML&QUAD=0&rndval=1233936642449COMMAND=EXPORT_SHMEM_XML&QUAD=0&
> rndval=1233936644447COMMAND=EXPORT_SHMEM_XML&QUAD=0&rndval=
> 1233936646450COMMAND=EXPORT_SHMEM_XML&QUAD=0&rndval=1233936648583
>
> You might also try the experimental slinger attached (I hope!) to this post,
> it's got the two bugs fixed that I found so far.
>
> Cheers,
> - ThomasTodd Peterson2013-03-26T23:51:35Zpost100125: Re: RE: AHCI reenumerationPavol Kycinahttp://community.qnx.com/sf/go/post1001252013-03-25T08:48:49Z2013-03-25T08:48:49ZSorry for my unclear definition of my problem.
I would like to connect the sata disk directly to sata port of the CPU board. I don't want to use USB as a means of connection.
In QNX4 the Fsys.ahci has some options like nports and pi. I haven't seen this options in devb-ahci.
Would it be possible to start two instances of Fsys.ahci (or devb-ahci), where those two instances would have different non overlapping bitmap masks?
Thanks, PKY
> If it's a SATA to usb, the host only understand mass storage usb protocol, it
> will up to the converter to do the rescan internally.
>
>
> -----Original Message-----
> From: Pavol Kycina [mailto:community-noreply@qnx.com]
> Sent: Friday, March 22, 2013 8:04 AM
> To: ostech-core_os
> Subject: AHCI reenumeration
>
> Hello.
>
> Still trying to solve the way how to safely store data in a control system.
>
> I would like to use disk in "removable caddy" to get copy of the data from a
> control system. I would prefer sata connection to usb (various reasons).
>
> Is there any way after inserting the disk to tell the system that it should
> rescan SATA ports for new disk?
>
> Thanks, PKY
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post100091
> To cancel your subscription to this discussion, please e-mail ostech-core_os-
> unsubscribe@community.qnx.comPavol Kycina2013-03-25T08:48:49Zpost100098: RE: AHCI reenumerationLichun Zhuhttp://community.qnx.com/sf/go/post1000982013-03-22T14:30:07Z2013-03-22T14:30:07ZIf it's a SATA to usb, the host only understand mass storage usb protocol, it will up to the converter to do the rescan internally.
-----Original Message-----
From: Pavol Kycina [mailto:community-noreply@qnx.com]
Sent: Friday, March 22, 2013 8:04 AM
To: ostech-core_os
Subject: AHCI reenumeration
Hello.
Still trying to solve the way how to safely store data in a control system.
I would like to use disk in "removable caddy" to get copy of the data from a control system. I would prefer sata connection to usb (various reasons).
Is there any way after inserting the disk to tell the system that it should rescan SATA ports for new disk?
Thanks, PKY
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post100091
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comLichun Zhu2013-03-22T14:30:07Zpost100091: AHCI reenumerationPavol Kycinahttp://community.qnx.com/sf/go/post1000912013-03-22T12:03:35Z2013-03-22T12:03:35ZHello.
Still trying to solve the way how to safely store data in a control system.
I would like to use disk in "removable caddy" to get copy of the data from a control system. I would prefer sata connection to usb (various reasons).
Is there any way after inserting the disk to tell the system that it should rescan SATA ports for new disk?
Thanks, PKYPavol Kycina2013-03-22T12:03:35Zpost100090: TimerTimeout in driverXiongwei Huanghttp://community.qnx.com/sf/go/post1000902013-03-22T09:43:44Z2013-03-22T09:43:44ZHi all
I found several driver use CLOCK_REALTIME in TimerTimeout() (etfs , sdma ,mx51espi )
but when a case of time adjusted system , this will cause signal lost ?
when adjusted time from Year 1970 to Year 2013, this maybe a problem ?
Shall we chage this to CLOCK_MONOTONIC ?
Is this a bug ?
regardsXiongwei Huang2013-03-22T09:43:44Zpost99746: Interesting server PPS question.shuo yanhttp://community.qnx.com/sf/go/post997462013-03-08T03:58:05Z2013-03-08T03:58:05ZI got a PPS issue. Here is the steps I did:
1) I created/open a server pps for other services to use. And listen to it.
2) Client1 open it, send a message to my pps. Not close it. I got the message.
3) Client2 open it, send a message to my pps. Not close it. I got the message.
4) Client1 send a message to my pps again. I don't got this message this time, but I got a message saying Client2 close fd of my pps.
5) Client1 send last message again. Now I got previous message and this message.
Question:
Step4) This is wired that Client2 shouldn't have any knowledge of Client1. Why it can close its fd after Client1 sent a message? Is it possible that it open this pps with 'server' as well? Why can't I get the message from Client1? It goes to Client2?
Step5) Why I can get previous message now?
I am so confused, please give me some hints. Any idea/comment is welcome. Thank you.
Shuoshuo yan2013-03-08T03:58:05Zpost99717: RE: posix_spawn and child file handlesNeil Schellenbergerhttp://community.qnx.com/sf/go/post997172013-03-06T21:40:57Z2013-03-06T21:40:57ZAs Mike says, probably your best bet is to narrow down the descriptor list to just those which you know are open. If iofdinfo() doesn't do the trick, fstat() definitely will.
________________________________________
From: Michael Kisel [community-noreply@qnx.com]
Sent: March-06-13 3:01 PM
To: ostech-core_os@community.qnx.com
Subject: Re: posix_spawn and child file handles
search on 'iofdinfo' at this link
http://www.qnx.com/developers/docs/6.5.0_sp1/index.jsp
I haven't tried it and the docs don't say so but I think you will get
back EBADF (or some other error) on unopened fd's
On 03/06/2013 02:17 PM, Jim Crites wrote:
> I am using posix_spwan (as opposed to qnx spawn) to create child processes because I need to explicitly set the uid:gid of the child process. Additionally I need for the child to not inherit any open handles from the parent. This is where the problem arises. From the QNX documentation I can create (and init) a posix_spawn_file_actions_t struct and then call posix_spawn_file_actions_addclose() for each file handle I want to be closed. The rub is I don't know how many or which handles are open. After some research I found what appeared to be a solution. Get the size of the process's file descriptor table and then call posix_spawn_file_actions_addclose() for each slot in the table. Two functions are available to get the table size getdtablesize() and sysconf( _SC_OPEN_MAX). Both of those functions return the same value, 3000. If I try to call addclose() for 3000 handles I die from a memory fault. Anybody know what's up with this ? Any alternative way to accomplish this ?
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post99711
> To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post99712
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comNeil Schellenberger2013-03-06T21:40:57Zpost99712: Re: posix_spawn and child file handlesMichael Kiselhttp://community.qnx.com/sf/go/post997122013-03-06T20:01:47Z2013-03-06T20:01:47Zsearch on 'iofdinfo' at this link
http://www.qnx.com/developers/docs/6.5.0_sp1/index.jsp
I haven't tried it and the docs don't say so but I think you will get
back EBADF (or some other error) on unopened fd's
On 03/06/2013 02:17 PM, Jim Crites wrote:
> I am using posix_spwan (as opposed to qnx spawn) to create child processes because I need to explicitly set the uid:gid of the child process. Additionally I need for the child to not inherit any open handles from the parent. This is where the problem arises. From the QNX documentation I can create (and init) a posix_spawn_file_actions_t struct and then call posix_spawn_file_actions_addclose() for each file handle I want to be closed. The rub is I don't know how many or which handles are open. After some research I found what appeared to be a solution. Get the size of the process's file descriptor table and then call posix_spawn_file_actions_addclose() for each slot in the table. Two functions are available to get the table size getdtablesize() and sysconf( _SC_OPEN_MAX). Both of those functions return the same value, 3000. If I try to call addclose() for 3000 handles I die from a memory fault. Anybody know what's up with this ? Any alternative way to accomplish this ?
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post99711
> To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comMichael Kisel2013-03-06T20:01:47Zpost99711: posix_spawn and child file handlesJim Criteshttp://community.qnx.com/sf/go/post997112013-03-06T19:17:58Z2013-03-06T19:17:58ZI am using posix_spwan (as opposed to qnx spawn) to create child processes because I need to explicitly set the uid:gid of the child process. Additionally I need for the child to not inherit any open handles from the parent. This is where the problem arises. From the QNX documentation I can create (and init) a posix_spawn_file_actions_t struct and then call posix_spawn_file_actions_addclose() for each file handle I want to be closed. The rub is I don't know how many or which handles are open. After some research I found what appeared to be a solution. Get the size of the process's file descriptor table and then call posix_spawn_file_actions_addclose() for each slot in the table. Two functions are available to get the table size getdtablesize() and sysconf( _SC_OPEN_MAX). Both of those functions return the same value, 3000. If I try to call addclose() for 3000 handles I die from a memory fault. Anybody know what's up with this ? Any alternative way to accomplish this ?Jim Crites2013-03-06T19:17:58Zpost99491: Re: RE: RE: posix_spawn() blocks indefinetelyEric Shufrohttp://community.qnx.com/sf/go/post994912013-02-23T20:45:39Z2013-02-23T20:45:39ZExcellent idea.
Thank you for your suggestions.
--EricEric Shufro2013-02-23T20:45:39Zpost99484: RE: RE: posix_spawn() blocks indefinetelyNeil Schellenbergerhttp://community.qnx.com/sf/go/post994842013-02-22T22:28:08Z2013-02-22T22:28:08ZThe process container is created at the specified priority and, as you might expect, the loader code runs within that process container (with those privileges etc.)
I'd have to check to see what other operating systems do, but that's what Neutrino does ;-)
One standard trick that we use to arrange for a spawned process to be modified before it starts running, is to start it held. In your example, you'd spawn the process at your prio but held; then you'd lower its prio and release it.
________________________________________
From: Eric Shufro [community-noreply@qnx.com]
Sent: February-22-13 9:16 AM
To: ostech-core_os
Subject: Re: RE: posix_spawn() blocks indefinetely
Neil,
Thank you for the reply. I find it interesting that the loading of the process image would occur at a lower priority since it seems as though this activity would occur from within the context of the caller. Of course, creating the 'container' and loading the process are still different than making the process/main thread ready and actually selecting it to run. My anticipation was that the process would be loaded, marked ready and simply not scheduled since its priority is less than a higher priority thread that is also ready. That's why I had expected the call to return with the PID without blocking.
Do most modern operating systems *wait* for the process to load at the configured or inherited priority or is this specific to the QNX Neutrino implementation?
Thanks,
--Eric
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post99458
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comNeil Schellenberger2013-02-22T22:28:08Zpost99458: Re: RE: posix_spawn() blocks indefinetelyEric Shufrohttp://community.qnx.com/sf/go/post994582013-02-22T14:16:55Z2013-02-22T14:16:55ZNeil,
Thank you for the reply. I find it interesting that the loading of the process image would occur at a lower priority since it seems as though this activity would occur from within the context of the caller. Of course, creating the 'container' and loading the process are still different than making the process/main thread ready and actually selecting it to run. My anticipation was that the process would be loaded, marked ready and simply not scheduled since its priority is less than a higher priority thread that is also ready. That's why I had expected the call to return with the PID without blocking.
Do most modern operating systems *wait* for the process to load at the configured or inherited priority or is this specific to the QNX Neutrino implementation?
Thanks,
--EricEric Shufro2013-02-22T14:16:55Zpost99442: RE: posix_spawn() blocks indefinetelyNeil Schellenbergerhttp://community.qnx.com/sf/go/post994422013-02-21T22:02:22Z2013-02-21T22:02:22ZIn this case, the system is working as intended. The higher priority thread has deliberately chosen to wait on a lower priority action: the loading of the lower priority process image file.
Remember that POSIX requires that if posix_spawn() cannot " ... create a new process (child process) from the specified process image" that "... no child process shall be created, the value stored into the variable pointed to by a non-NULL pid is unspecified, and an error number shall be returned as the function return value to indicate the error." Fulfilling this condition requires more than just the creation of the process container (i.e. a pid) -- it must actually load the image.
________________________________________
From: Eric Shufro [community-noreply@qnx.com]
Sent: February-21-13 4:44 PM
To: ostech-core_os
Subject: posix_spawn() blocks indefinetely
Hello. Does anyone have any idea why posix_spawn() blocks my process indefinitely within MsgSendvnc()?
The preconditions are as follows :
(1) Process of priority 10 is deliberately placed in to an infinite loop without blocking; e.g. while (1) {};
(2) Process of priority 20 attempts to spawn a new process of priority 8 using posix_spawn() and becomes blocked.
It appears that posix_spawn() is waiting for the pid() of the new process to become available, and in doing so, perhaps requires that the process be scheduled. This seems counter intuitive since the pid should be available at the time that the process is loaded into the process space and marked ready.
Nonetheless, since lower priority process is readied and is unable to run due to the slightly higher priority process spinning, my highest priority process is unable to continue and remains blocked in what appears to be priority inversion.
OS Version : Neutrino 6.5.0
Thoughts?
Thank you in advance.
--Eric
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post99439
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comNeil Schellenberger2013-02-21T22:02:22Zpost99439: posix_spawn() blocks indefinetelyEric Shufrohttp://community.qnx.com/sf/go/post994392013-02-21T21:44:11Z2013-02-21T21:44:11ZHello. Does anyone have any idea why posix_spawn() blocks my process indefinitely within MsgSendvnc()?
The preconditions are as follows :
(1) Process of priority 10 is deliberately placed in to an infinite loop without blocking; e.g. while (1) {};
(2) Process of priority 20 attempts to spawn a new process of priority 8 using posix_spawn() and becomes blocked.
It appears that posix_spawn() is waiting for the pid() of the new process to become available, and in doing so, perhaps requires that the process be scheduled. This seems counter intuitive since the pid should be available at the time that the process is loaded into the process space and marked ready.
Nonetheless, since lower priority process is readied and is unable to run due to the slightly higher priority process spinning, my highest priority process is unable to continue and remains blocked in what appears to be priority inversion.
OS Version : Neutrino 6.5.0
Thoughts?
Thank you in advance.
--EricEric Shufro2013-02-21T21:44:11Zpost99222: SAS or RAID supportPavol Kycinahttp://community.qnx.com/sf/go/post992222013-02-12T14:12:18Z2013-02-12T14:12:18ZIs there any SAS board supported?
I have checked supported HW database and haven't seen any SAS board support.
In our previous system deliveries we used IDE/SATA SOHO RAID boxes, we tried several manufacturers, but we were several time disappointed with the results/reliability.
It seems to me that there is a better choice of SAS RAID units, but to be able to use them SAS card would be needed in computer.
Or any other idea how to deliver RAID functionality?
Thanks, PKYPavol Kycina2013-02-12T14:12:18Zpost98896: Re: Call to read() returns EINVAL when it should be returning EAGAINDennis Kelllyhttp://community.qnx.com/sf/go/post988962013-01-30T14:12:50Z2013-01-30T14:12:50ZI tried this and it worked as expected - both on ser1 and and serusb1. read() returned -1 with errno as EAGAIN.Dennis Kellly2013-01-30T14:12:50Zpost98887: RE: Call to read() returns EINVAL when it should be returning EAGAINMate Szarvashttp://community.qnx.com/sf/go/post988872013-01-30T09:02:38Z2013-01-30T09:02:38ZHi Jim,
This is likely not the best forum for this hardware related question; core OS is more like scheduling algorithms or IPC mechanisms.
You would be more likely to get a relevant reply either via a hardware-related forum or, if you have one, via your formal support interface.
-----Original Message-----
From: Jim Douglas [mailto:community-noreply@qnx.com]
Sent: Wednesday, January 30, 2013 5:58 PM
To: ostech-core_os
Subject: Call to read() returns EINVAL when it should be returning EAGAIN
OS version 6.5.0 SP1
My application is reading from a serial port created using devc-serusb. The port is opened using the O_NONBLOCK flag. The port (m_in) is polled every 10 ms with a call like -
uint8_t c = 0;
int32_t ret = read( m_in, &c, 1 );
When there is nothing to read ret is set to -1 and errno is set to EINVAL, whereas according to the documentation it should be set to EAGAIN. When there is data available to be read, ret is set to 1 and c contains the received byte, which is correct.
I cannot just ignore the errno because I need to detect a failure caused by the user unplugging the USB cable.
Is this a bug, or am I missing something?
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post98886
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comMate Szarvas2013-01-30T09:02:38Zpost98886: Call to read() returns EINVAL when it should be returning EAGAINJim Douglashttp://community.qnx.com/sf/go/post988862013-01-30T08:58:18Z2013-01-30T08:58:18ZOS version 6.5.0 SP1
My application is reading from a serial port created using devc-serusb. The port is opened using the O_NONBLOCK flag. The port (m_in) is polled every 10 ms with a call like -
uint8_t c = 0;
int32_t ret = read( m_in, &c, 1 );
When there is nothing to read ret is set to -1 and errno is set to EINVAL, whereas according to the documentation it should be set to EAGAIN. When there is data available to be read, ret is set to 1 and c contains the received byte, which is correct.
I cannot just ignore the errno because I need to detect a failure caused by the user unplugging the USB cable.
Is this a bug, or am I missing something?Jim Douglas2013-01-30T08:58:18Zpost98766: RE: mq_open(): Function not implementedDavid Sarrazinhttp://community.qnx.com/sf/go/post987662013-01-24T16:42:57Z2013-01-24T16:42:57ZYou must have the "mq" or "mqueue" resource manager started before you can use mq_open().
________________________________________
From: Samual Peng [community-noreply@qnx.com]
Sent: Thursday, January 24, 2013 11:41 AM
To: ostech-core_os
Subject: mq_open(): Function not implemented
Hi,
I have an app just after kernal booting up. I used traditional message queue in mt app. If mq_open() is called right away, it shows "mq_open(): Function not implemented". If I put sleep(1) before mq_open(), it works fine.
As my understanding, mq_open(...,"my_mq_name",...) will create a path /dev/mqueue/my_mq_name; just like file open() to create file descriptor.
Question: Is there any precondition or dependence for using mq_open();
Thanks!
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post98765
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comDavid Sarrazin2013-01-24T16:42:57Zpost98765: mq_open(): Function not implementedSamual Penghttp://community.qnx.com/sf/go/post987652013-01-24T16:41:00Z2013-01-24T16:41:00ZHi,
I have an app just after kernal booting up. I used traditional message queue in mt app. If mq_open() is called right away, it shows "mq_open(): Function not implemented". If I put sleep(1) before mq_open(), it works fine.
As my understanding, mq_open(...,"my_mq_name",...) will create a path /dev/mqueue/my_mq_name; just like file open() to create file descriptor.
Question: Is there any precondition or dependence for using mq_open();
Thanks!Samual Peng2013-01-24T16:41:00Zpost98656: Re: support of shmget apiAshwini Dubeyhttp://community.qnx.com/sf/go/post986562013-01-18T08:46:29Z2013-01-18T08:46:29ZScript is
#!/usr/bin/perl
$file_shmem = "/home/Vishal_Home/bolts";
$size_shmem = 18640;
open( F, "./ftok $file_shmem 1 |" );
$s1 = <F>;
close F;
chomp $s1;
$ipckey = "0x$s1";
print "IPC-KEY of ($file_shmem) is $ipckey \n";
$idshm = shmget( $ipckey, $size_shmem, 0666 ) || die "\n Creation of shared memory failed $! \n";
print "IPC-SHMEM: id $idshm \n";
shmread( $idshm, $data_shmem, 0, $size_shmem ) || warn "\n\n Error reading shared-memory: $! \n";
Error is-
$ ./myshm.pl
IPC-KEY of (/home/Vishal_Home/bolts) is 0x
System V IPC is not implemented on this machine at ./myshm.pl line 10.
$Ashwini Dubey2013-01-18T08:46:29Zpost98637: Re: support of shmget apiSean Boudreauhttp://community.qnx.com/sf/go/post986372013-01-17T14:51:54Z2013-01-17T14:51:54ZDo you have a sample perl script?Sean Boudreau2013-01-17T14:51:54Zpost98635: Re: support of shmget apiSean Boudreauhttp://community.qnx.com/sf/go/post986352013-01-17T14:43:42Z2013-01-17T14:43:42ZYou can try running the s5ipc manager and linking perl against libs5ipc.
It's in pkgsrc under sysutils/s5ipc.
http://community.qnx.com/sf/projects/pkgsrc
On Thu, Jan 17, 2013 at 07:31:03AM -0500, Ashwini Dubey wrote:
> I am trying to access the shared memory created in qnx using scripting language(perl).
> But it throwing some error i.e. perl is returning saying this machine do not support shmget. Is there any way of supporting it.
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post98631
> To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comSean Boudreau2013-01-17T14:43:42Zpost98631: support of shmget apiAshwini Dubeyhttp://community.qnx.com/sf/go/post986312013-01-17T12:31:03Z2013-01-17T12:31:03ZI am trying to access the shared memory created in qnx using scripting language(perl).
But it throwing some error i.e. perl is returning saying this machine do not support shmget. Is there any way of supporting it.Ashwini Dubey2013-01-17T12:31:03Zpost98472: L2 cache sharing + procnto affinityMark Dowdyhttp://community.qnx.com/sf/go/post984722013-01-10T01:09:35Z2013-01-10T01:09:35ZWe're battling an issue where some of our time critical threads just "run slow". We have kernel traces where a group of threads run at one rate and then the next iteration, they run roughly twice as long (the threads are not being preempted, the run time is longer). Our thoughts turn to cache coherency. If some intervening threads run and cause a cache change, that would explain the longer run time if there are cache misses and system memory reads were required in the slow iterations. We're running on an x86 machine with the "Harpertown" CPU (E5440) that looks to be a dual-die dual-core part. Each core has a dedicated 32K L1 cache and two 6 MB L2 caches. Each L2 cache is shared by two of the cores but the question is which two? Unix has the cpuinfo command to show the cache sharing (see http://software.intel.com/en-us/forums/topic/291067). How can we determine the CPU number, from a QNX perspective, to L2 cache association in QNX? In Linux, core 0/1 do not share an L2 cache, the sharing is 0/2 and 1/3.
Our goal is to do CPU affinity assignments that increases the likelihood of cache coherency in our time critical threads. Is there a way to limit which core the procnto threads, actually procnto-smp-instr, run on? When we see cache coherency issues, we see some of the higher number procnto threads (i.e. 14) running on cores that we'd like to reserve for our time critical use.
Thanks.Mark Dowdy2013-01-10T01:09:35Zpost98207: RE: RE: format of .kev fileMario Charesthttp://community.qnx.com/sf/go/post982072012-12-18T14:51:51Z2012-12-18T14:51:51Z> -----Message d'origine-----
> De : Veer Beede [mailto:community-noreply@qnx.com]
> Envoyé : 18 décembre 2012 05:52
> À : ostech-core_os
> Objet : Re: RE: format of .kev file
>
> In that case, you can rather use syslog in your application. How different it is
> going to be with the way you plan to use trace events?
Nanosecond precision, no context switch, each process has its record buffer greatly reducing resource contention (want to keep the 12 cores busy), no overhead for filtering unwanted event coming from other processes, portability.
For now I want to convert our data into a kev file to make use of the system profiler, but down the road ( many months as our GUI group is totally swamp with work, phew good thing, a few years back, we choose not to used photon... I digress) we will have our own application to display the data.
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post98192
> To cancel your subscription to this discussion, please e-mail ostech-core_os-
> unsubscribe@community.qnx.comMario Charest2012-12-18T14:51:51Zpost98192: Re: RE: format of .kev fileVeer Beedehttp://community.qnx.com/sf/go/post981922012-12-18T10:51:30Z2012-12-18T10:51:30ZIn that case, you can rather use syslog in your application. How different it is going to be with the way you plan to use trace events?Veer Beede2012-12-18T10:51:30Zpost98185: RE: format of .kev fileMario Charesthttp://community.qnx.com/sf/go/post981852012-12-18T04:43:48Z2012-12-18T04:43:48ZI want to generate a file but not from QNX's API, from my own code without the need for the instrumented kernel. Obviously it would only contains USER EVENT but that is pretty much what I need.
______________________________________
From: Colin Burgess [community-noreply@qnx.com]
Sent: Monday, December 17, 2012 10:19 PM
To: ostech-core_os@community.qnx.com
Subject: Re: format of .kev file
I don't think so. What are you looking to do?
On 12-12-17 8:01 PM, Mario Charest wrote:
> Is the format of the .kev file documented somewhere?
>
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post98183
> To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com
--
cburgess@qnx.com
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post98184
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comMario Charest2012-12-18T04:43:48Zpost98184: Re: format of .kev fileColin Burgesshttp://community.qnx.com/sf/go/post981842012-12-18T03:23:04Z2012-12-18T03:23:04ZI don't think so. What are you looking to do?
On 12-12-17 8:01 PM, Mario Charest wrote:
> Is the format of the .kev file documented somewhere?
>
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post98183
> To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com
--
cburgess@qnx.comColin Burgess2012-12-18T03:23:04Zpost98183: format of .kev fileMario Charesthttp://community.qnx.com/sf/go/post981832012-12-18T01:01:59Z2012-12-18T01:01:59ZIs the format of the .kev file documented somewhere?Mario Charest2012-12-18T01:01:59Zpost97936: Re: How to use a USB barcode reader as an HID deviceRobert Murrellhttp://community.qnx.com/sf/go/post979362012-12-10T15:17:43Z2012-12-10T15:17:43ZI have verified that the console is in raw mode. I found the setup program for the barcode reader that lets me configure some parameters. I programmed it to issue a carriage return after a read, and ran devc-con-hid in edit mode. This didn't help.
I found that if I boosted the priority of the usbdi_event_handler(6) task in io-hid to 15, the problem went away. This priority is above the UI, logging, and Ethernet tasks and even with our serial communications task.
I could boost this task's priority in our application when it starts, but I only want to do this as a last resort. Is there any native way to boost this task in io-hid?
I would be satisfied by a custom version of io-hid, but access to the source code is nearly impossible now.Robert Murrell2012-12-10T15:17:43Zpost97870: Re: How to use a USB barcode reader as an HID deviceDennis Kelllyhttp://community.qnx.com/sf/go/post978702012-12-06T16:13:56Z2012-12-06T16:13:56ZIn your program which opens /dev/con1, try setting the device to "raw". You can use "stty -a </dev/con1" to verify all settings.
In particular, make sure you see -icanon.Dennis Kellly2012-12-06T16:13:56Zpost97869: Re: How to use a USB barcode reader as an HID deviceRobert Murrellhttp://community.qnx.com/sf/go/post978692012-12-06T16:11:49Z2012-12-06T16:11:49ZI used renice to boost the priority of io-hid until its receive thread went from 21 to 25. This seems to have fixed the problem. I believe the fault lies in the io-hid or devh-usb.so drivers. If I power up the reader without USB communications, when reading a barcode, the reader will fault after 3 seconds. The problem I'm seeing is that the fault is issued immediately on reading the code.
RS-232 barcode readers do not have this problem as the UART drivers are interrupt driven and buffer the characters. The reader itself is only issuing less than 20 characters per read.
Is there a better solution than having our application adjust the priority of external processes to fix this?Robert Murrell2012-12-06T16:11:49Zpost97866: Re: How to use a USB barcode reader as an HID deviceRobert Murrellhttp://community.qnx.com/sf/go/post978662012-12-06T14:51:50Z2012-12-06T14:51:50ZI found my original problem of why read is blocking. The console driver is running in editing mode and is awaiting for a carriage return to unblock the read. The barcode readier is issuing a string of characters followed by a tab character. I can not change this behavior. I started the console driver with the '-E' argument and my simple test program now works:
devc-con-hid -E
I put the code in our application, and now it only reads a few characters before the reader indicates an error. The application has many threads that run at higher priority that the rest of the system. The barcode thread is running at priority 12. most other threads are running at a higher priority, some as high as 25. I can only guess that some kind of timeout or overrun is occurring.
Any ideas for fixing this?Robert Murrell2012-12-06T14:51:50Zpost96896: Re: QNX 6.5 OCB Extension BugDante Tezzahttp://community.qnx.com/sf/go/post968962012-11-06T17:49:42Z2012-11-06T17:49:42ZHi Timothy,
Thanks for your help, I have been busy lately and didnt have much time to deal with this issue. I will read your code and try it on our application and let you know how it goes.
Thank you,
DanteDante Tezza2012-11-06T17:49:42Zpost96895: Re: QNX 6.5 OCB Extension BugDante Tezzahttp://community.qnx.com/sf/go/post968952012-11-06T17:45:54Z2012-11-06T17:45:54ZHi Saul,
I havent yet, I was solving another issue that we are facing but now I am getting back to solve this one. I will keep the post updated.
DanteDante Tezza2012-11-06T17:45:54Zpost96791: Re: QNX 6.5 OCB Extension BugTimothy Fisherhttp://community.qnx.com/sf/go/post967912012-11-02T13:14:31Z2012-11-02T13:14:31ZHi Dante,
I was interested in your post because we seem to have some similar issues in our application.
After working with your code for a while, I found a solution to your problem. The problem with your code seems to be where you call the iofunc_attr_init function. When I run your original code, I get a core dump error after loading the server and then running the client. If I move the call to iofunc_attr_init down a few lines after the attr.mount variable has been set, then the program works correctly. I modified your code to accept a command line option. If you run the new code with option 1 (serverRM 1 &), it runs just like your original code. If you run the new code with option 2 (serverRM 2 &), then it calls the iofunc_attr_init function after the attr.mount variable has been set.
I can't explain why your code seemed to work on the older version of QNX.
I hope this helps.
-Tim FisherTimothy Fisher2012-11-02T13:14:31Zpost96532: Re: QNX 6.5 OCB Extension BugSaul Ahttp://community.qnx.com/sf/go/post965322012-10-22T23:50:25Z2012-10-22T23:50:25ZHi Dante,
have you found solution to this?
thanks,
SaulSaul A2012-10-22T23:50:25Zpost96509: RE: Question about support lifecycleChris Travishttp://community.qnx.com/sf/go/post965092012-10-22T13:43:32Z2012-10-22T13:43:32ZEmail info@qnx.com with details of region you/customer are located and your questions and the regional sales rep will get back to you.
-----Original Message-----
From: Seyfettin Sünger [mailto:community-noreply@qnx.com]
Sent: October-22-12 4:00 AM
To: ostech-core_os
Subject: Re: Question about support lifecycle
I believe it will be better if you contact to your local representative for those questions.
Regards,
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post96494
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comChris Travis2012-10-22T13:43:32Zpost96494: Re: Question about support lifecycleSeyfettin Süngerhttp://community.qnx.com/sf/go/post964942012-10-22T07:59:42Z2012-10-22T07:59:42ZI believe it will be better if you contact to your local representative for those questions.
Regards,Seyfettin Sünger2012-10-22T07:59:42Zpost96488: Question about support lifecycleSaul Ahttp://community.qnx.com/sf/go/post964882012-10-21T15:35:27Z2012-10-21T15:35:27ZI am a consultant. A customer of mine has QNX v. 6.3.2 and I'd like to upgrade them.
So could anyone answer these questions:
1. Does 6.3.2 have any support deadline? Especially, given the current situation around QNX.
2. Will 6.5 run on same hardware as 6.3.2? they have a x86 PC-like board made in ~ 2005, no ACPI.
3. How much it may cost to the customer to update to 6.5: runtime licenses? IDE/Dev.kit? Other costs?
Thanks in advance,
SaulSaul A2012-10-21T15:35:27Zpost96266: Re: RE: Gaining acces to interrupt descriptor memoryEric Patrizihttp://community.qnx.com/sf/go/post962662012-10-11T20:18:39Z2012-10-11T20:18:39Zmmap64 did not appear to work. I connected to the timer ISR and was able to access the IDT memory without mapping in the memory. I am guessing the address stored in the IDT register is a kernel virtual address and the timer ISR is executing from kernel space, it has access to that memory.
Anyway, now my problem is sharing some data between my ISR and task. Some posts seemed to indicate the ISR would be able to access a global variable or use the communication area pointer passed in to the interruptAttach() function. However, neither would work for me.
I am okay with writing a resource manager or device driver if that is required, just do not want to do the work unless I know it is needed.Eric Patrizi2012-10-11T20:18:39Zpost96196: RE: Gaining acces to interrupt descriptor memoryMario Charesthttp://community.qnx.com/sf/go/post961962012-10-10T15:52:12Z2012-10-10T15:52:12ZTry with mmap64,
-----Message d'origine-----
De : Eric Patrizi [mailto:community-noreply@qnx.com]
Envoyé : Wednesday, October 10, 2012 10:53 AM
À : ostech-core_os
Objet : Re: Gaining acces to interrupt descriptor memory
Ring 0 access may not be necessary. I was hoping someone might know the answer to that. When I execute
BYTE idt[6];
__asm__("sidt %0"
: "=m"(idt)
);
I get
p /x idt = (0xf, 0x2, 0x38, 0x1d, 0xd1, 0xfe)
The limit 0x20f could make sense (QNX only supporting 0x42 interrupts, and it is supposed to be a multiple of 8 minus 1). However, the address 0xfed11d38 does not appear to be a physical address as my x86 board only has 512 MB installed. mmap() allows me to map this address, but all I read are 0xffffffff's. If 0xfed11d38 is a virtual address, I don't think mmap can be used. Does anyone know (or have an idea) how to map access to it?
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post96187
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comMario Charest2012-10-10T15:52:12Zpost96188: How to use a USB barcode reader as an HID deviceRobert Murrellhttp://community.qnx.com/sf/go/post961882012-10-10T14:53:45Z2012-10-10T14:53:45ZWe have a minimal QNX installation on an embedded device. Very early in the startup, I redirect all console I/O to a serial port. Our application uses advanced graphics to write to the LCD screen, but all processes use the serial port for stdio for debug purposes.
I was recently asked to try to interface a USB barcode reader to our unit. This reader acts like a standard PC USB keyboard. Reading a barcode spits out a sequence of keystrokes. It works with any Windows PC and our laptop with a full QNX with Photon installation.
To try this out on our device, I started io-hid and devc-con-hid:
# io-hid -d usb
# devc-con-hid
I can plug the reader into the USB port and scan barcodes without error. This tells me that someone is properly consuming the keystrokes. I then wrote a simple program to try and read the characters. I developed and ran it under QNX Momentics Debugger.
It opens "/dev/con1" without error.
It calls "select" to wait for activity. It pends until I read a barcode and indicates that there is something to read on the file descriptor.
I call ioctl FIONREAD to read the number of bytes available. This call returns with EFAULT error.
I try reading one byte with "read" and this never returns.
What am I doing wrong?Robert Murrell2012-10-10T14:53:45Zpost96187: Re: Gaining acces to interrupt descriptor memoryEric Patrizihttp://community.qnx.com/sf/go/post961872012-10-10T14:53:29Z2012-10-10T14:53:29ZRing 0 access may not be necessary. I was hoping someone might know the answer to that. When I execute
BYTE idt[6];
__asm__("sidt %0"
: "=m"(idt)
);
I get
p /x idt = (0xf, 0x2, 0x38, 0x1d, 0xd1, 0xfe)
The limit 0x20f could make sense (QNX only supporting 0x42 interrupts, and it is supposed to be a multiple of 8 minus 1). However, the address 0xfed11d38 does not appear to be a physical address as my x86 board only has 512 MB installed. mmap() allows me to map this address, but all I read are 0xffffffff's. If 0xfed11d38 is a virtual address, I don't think mmap can be used. Does anyone know (or have an idea) how to map access to it?Eric Patrizi2012-10-10T14:53:29Zpost96173: Re: Gaining acces to interrupt descriptor memoryArmin Steinhoffhttp://community.qnx.com/sf/go/post961732012-10-10T07:11:34Z2012-10-10T07:11:34ZEric,
access to ring 0 isn't supported !
--Armin
Eric Patrizi wrote:
> I need to be able to read the interrupt vector (descriptor) table memory in order to periodically perform a CRC calculation to verify the table has not been corrupted. Getting the address of the table seems to work at any privilege level.
>
> BYTE idt[6];
>
> __asm__("sidt %0"
> : "=m"(idt)
> );
>
> However, I get a seg fault when I try to access the memory. Understandable when done from user code. I attempted to access the memory from a timer interrupt (via timer_create() and SIGALRM) thinking that would allow (put me in ring 0) the access, but still get the seg fault.
>
> Anyone have any ideas how to get access to this memory? Do I need to map it in? Is code executed in the timer interrupt executed at ring 0?
>
> I am using QNX 6.3.2.
>
> Thanks,
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post96167
> To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com
>Armin Steinhoff2012-10-10T07:11:34Zpost96171: RE: RE: Gaining acces to interrupt descriptor memoryMario Charesthttp://community.qnx.com/sf/go/post961712012-10-10T02:27:01Z2012-10-10T02:27:01ZInterrupt 0x41 ? You can`t randomly pick an interrupt. Your best bet is to connect to the timer interrupt, however what it is depends on the machine, on some it`s 0 on other it`s 2. Check InterruptAttach() to install your ISR.
Everything in QNX is virtual, even when running in the context of an ISR, so you must take your physical address and map it to a virtual address via mmap()
-----Message d'origine-----
De : Eric Patrizi [mailto:community-noreply@qnx.com]
Envoyé : Tuesday, October 09, 2012 9:58 PM
À : ostech-core_os
Objet : Re: RE: Gaining acces to interrupt descriptor memory
Yes, most of the error checking we are required (Nuclear industry) to do is only valid on working hardware. Any failure and the most likely scenario is a dead processor.
I tried using a software interrupt "INT $0x41",
but my ISR was never called. I will put a little more effort into that. I picked 0x41 out of thin air, not sure what software interrupts the OS is using . Would a software interrupt ISR execute in ring 0? Would you expect the IDTR to have a physical memory address or virtual? I was assuming physical, but the address was a little odd.
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post96170
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comMario Charest2012-10-10T02:27:01Zpost96170: Re: RE: Gaining acces to interrupt descriptor memoryEric Patrizihttp://community.qnx.com/sf/go/post961702012-10-10T01:58:01Z2012-10-10T01:58:01ZYes, most of the error checking we are required (Nuclear industry) to do is only valid on working hardware. Any failure and the most likely scenario is a dead processor.
I tried using a software interrupt "INT $0x41", but my ISR was never called. I will put a little more effort into that. I picked 0x41 out of thin air, not sure what software interrupts the OS is using . Would a software interrupt ISR execute in ring 0? Would you expect the IDTR to have a physical memory address or virtual? I was assuming physical, but the address was a little odd.Eric Patrizi2012-10-10T01:58:01Zpost96168: RE: Gaining acces to interrupt descriptor memoryMario Charesthttp://community.qnx.com/sf/go/post961682012-10-10T01:02:02Z2012-10-10T01:02:02ZYou need to map it first I would think, then you may or may not need ring 0 to read this, I don`t know. SIGALRM is NOT an interrupt, nor is timer_create. You would need to install a real ISR.
-----Message d'origine-----
De : Eric Patrizi [mailto:community-noreply@qnx.com]
Envoyé : Tuesday, October 09, 2012 8:44 PM
À : ostech-core_os
Objet : Gaining acces to interrupt descriptor memory
I need to be able to read the interrupt vector (descriptor) table memory in order to periodically perform a CRC calculation to verify the table has not been corrupted. Getting the address of the table seems to work at any privilege level.
BYTE idt[6];
__asm__("sidt %0"
: "=m"(idt)
);
However, I get a seg fault when I try to access the memory. Understandable when done from user code. I attempted to access the memory from a timer interrupt (via timer_create() and SIGALRM) thinking that would allow (put me in ring 0) the access, but still get the seg fault.
Anyone have any ideas how to get access to this memory? Do I need to map it in? Is code executed in the timer interrupt executed at ring 0?
I am using QNX 6.3.2.
Thanks,
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post96167
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comMario Charest2012-10-10T01:02:02Zpost96169: RE: Gaining acces to interrupt descriptor memoryMario Charesthttp://community.qnx.com/sf/go/post961692012-10-10T01:00:55Z2012-10-10T01:00:55ZMy guess is, if this gets corrupted you would not be able to check it, the machine would go bye bye. Don`t know about your application but I don`t think it`s wise to assume this doesn`t change. I doubt it does but I never read anything about it NOT changing.
-----Message d'origine-----
De : Eric Patrizi [mailto:community-noreply@qnx.com]
Envoyé : Tuesday, October 09, 2012 8:44 PM
À : ostech-core_os
Objet : Gaining acces to interrupt descriptor memory
I need to be able to read the interrupt vector (descriptor) table memory in order to periodically perform a CRC calculation to verify the table has not been corrupted. Getting the address of the table seems to work at any privilege level.
BYTE idt[6];
__asm__("sidt %0"
: "=m"(idt)
);
However, I get a seg fault when I try to access the memory. Understandable when done from user code. I attempted to access the memory from a timer interrupt (via timer_create() and SIGALRM) thinking that would allow (put me in ring 0) the access, but still get the seg fault.
Anyone have any ideas how to get access to this memory? Do I need to map it in? Is code executed in the timer interrupt executed at ring 0?
I am using QNX 6.3.2.
Thanks,
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post96167
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comMario Charest2012-10-10T01:00:55Zpost96167: Gaining acces to interrupt descriptor memoryEric Patrizihttp://community.qnx.com/sf/go/post961672012-10-10T00:43:37Z2012-10-10T00:43:37ZI need to be able to read the interrupt vector (descriptor) table memory in order to periodically perform a CRC calculation to verify the table has not been corrupted. Getting the address of the table seems to work at any privilege level.
BYTE idt[6];
__asm__("sidt %0"
: "=m"(idt)
);
However, I get a seg fault when I try to access the memory. Understandable when done from user code. I attempted to access the memory from a timer interrupt (via timer_create() and SIGALRM) thinking that would allow (put me in ring 0) the access, but still get the seg fault.
Anyone have any ideas how to get access to this memory? Do I need to map it in? Is code executed in the timer interrupt executed at ring 0?
I am using QNX 6.3.2.
Thanks,Eric Patrizi2012-10-10T00:43:37Zpost96157: Re: RE: ISR on SMPJavier I. Acosta M.http://community.qnx.com/sf/go/post961572012-10-09T21:13:52Z2012-10-09T21:13:52ZHi,
The 2 ISRs do run concurrently.
Now the problem is this: am I allowed to change QTIME from the ISR? (Is this supported?)
Thanks,
JavierJavier I. Acosta M.2012-10-09T21:13:52Zpost96121: Re: _KER_NOP Enter/_KER_NOP_ExitDennis Kelllyhttp://community.qnx.com/sf/go/post961212012-10-09T13:34:44Z2012-10-09T13:34:44ZThanks. Seems to roughly correspond to a cross-core interrupt except on same core.
----- Original Message -----
From: Colin Burgess [mailto:community-noreply@qnx.com]
Sent: Tuesday, October 09, 2012 09:07 AM
To: ostech-core_os@community.qnx.com <ostech-core_os@community.qnx.com>
Subject: Re: _KER_NOP Enter/_KER_NOP_Exit
The NOP kercall is used to force a thread into the kernel so scheduling
can take place. So that time is spent selecting and switching the
running thread.
On 12-10-08 8:13 AM, Dennis Kellly wrote:
> Kernel trace for fftgen (mcdemo) i.mx6 (SP1), 4-cores, 8 compute-bound threads with round-robin schedulling,
>
> Whenever the rr timer expires, the kernel trace shows a _KER_NOP Enter/_KER_NOP_Exit pair. This seems to correspond to the switch of one thread to another thread ON THE SAME CORE. It shows 1-2us between enter/exit.
>
> Is this time lost? What is really going on?
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post96104
> To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com
--
cburgess@qnx.com
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post96119
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comDennis Kellly2012-10-09T13:34:44Zpost96119: Re: _KER_NOP Enter/_KER_NOP_ExitColin Burgesshttp://community.qnx.com/sf/go/post961192012-10-09T13:11:17Z2012-10-09T13:11:17ZThe NOP kercall is used to force a thread into the kernel so scheduling
can take place. So that time is spent selecting and switching the
running thread.
On 12-10-08 8:13 AM, Dennis Kellly wrote:
> Kernel trace for fftgen (mcdemo) i.mx6 (SP1), 4-cores, 8 compute-bound threads with round-robin schedulling,
>
> Whenever the rr timer expires, the kernel trace shows a _KER_NOP Enter/_KER_NOP_Exit pair. This seems to correspond to the switch of one thread to another thread ON THE SAME CORE. It shows 1-2us between enter/exit.
>
> Is this time lost? What is really going on?
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post96104
> To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com
--
cburgess@qnx.comColin Burgess2012-10-09T13:11:17Zpost96104: _KER_NOP Enter/_KER_NOP_ExitDennis Kelllyhttp://community.qnx.com/sf/go/post961042012-10-08T12:13:36Z2012-10-08T12:13:36ZKernel trace for fftgen (mcdemo) i.mx6 (SP1), 4-cores, 8 compute-bound threads with round-robin schedulling,
Whenever the rr timer expires, the kernel trace shows a _KER_NOP Enter/_KER_NOP_Exit pair. This seems to correspond to the switch of one thread to another thread ON THE SAME CORE. It shows 1-2us between enter/exit.
Is this time lost? What is really going on?Dennis Kellly2012-10-08T12:13:36Zpost95982: Re: RE: Exclusive access to physical memoryKevin Stallardhttp://community.qnx.com/sf/go/post959822012-10-02T18:11:11Z2012-10-02T18:11:11ZThanks Jerry,
I'll take a look, I'm worried that it is may not be persistent (doesn't stay resident) and showmen won't catch it..
KevinKevin Stallard2012-10-02T18:11:11Zpost95978: RE: Exclusive access to physical memoryJerry Suihttp://community.qnx.com/sf/go/post959782012-10-02T17:07:58Z2012-10-02T17:07:58ZI don't think you can prevent shared mapping for those memory, but you can always use showmem to find out if the registers are shared mapped to other processes.
Jerry Sui | Software Developer | jsui@qnx.com
O:613-591-0836 x 24904 C:613-240-9239 | www.qnx.com | QNX Software Systems
Cisco Support Team email: cisco_support@qnx.com
-----Original Message-----
From: Kevin Stallard [mailto:community-noreply@qnx.com]
Sent: October-02-12 12:34 PM
To: ostech-core_os
Subject: Exclusive access to physical memory
Hi,
We have a device driver (NAND Flash) that we wish to have exclusive access to the NAND registers. We suspect something is clobbering these registers and we'd like that something to seg-fault. The MAP_PRIVATE appears to make a copy of the are specified and allocate memory for the process.
Is there a flag/api function that would allow us to use the MMU to prevent any other process from accessing the NAND flash registers after our driver has mapped them to its own process space?
Thanks
Kevin
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post95976
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comJerry Sui2012-10-02T17:07:58Zpost95976: Exclusive access to physical memoryKevin Stallardhttp://community.qnx.com/sf/go/post959762012-10-02T16:33:56Z2012-10-02T16:33:56ZHi,
We have a device driver (NAND Flash) that we wish to have exclusive access to the NAND registers. We suspect something is clobbering these registers and we'd like that something to seg-fault. The MAP_PRIVATE appears to make a copy of the are specified and allocate memory for the process.
Is there a flag/api function that would allow us to use the MMU to prevent any other process from accessing the NAND flash registers after our driver has mapped them to its own process space?
Thanks
KevinKevin Stallard2012-10-02T16:33:56Zpost95852: Re: Passing flag args to pterm, when pterm is spawned.Jim Baddoohttp://community.qnx.com/sf/go/post958522012-09-26T17:36:14Z2012-09-26T17:36:14ZThank you for the reply. Passing the arguments individually worked.Jim Baddoo2012-09-26T17:36:14Zpost95801: Re: Passing flag args to pterm, when pterm is spawned.Gervais Mulongoyhttp://community.qnx.com/sf/go/post958012012-09-25T19:39:54Z2012-09-25T19:39:54ZSounds like you are not constructing the argument vector correctly.
Try something like this:
char *args[]={"on", "-c1", "./MyApp", NULL};
Now pass args as the argv for spawn().Gervais Mulongoy2012-09-25T19:39:54Zpost95790: Passing flag args to pterm, when pterm is spawned.Jim Baddoohttp://community.qnx.com/sf/go/post957902012-09-25T15:39:45Z2012-09-25T15:39:45ZI have a command file that executes the following command:
pterm -z on -C 1 ./MyApp
This has the effect of launching pterm, and then MyApp is launched within pterm by 'on' - in other words, it's as if one had typed into a pterm shell
on -C 1 ./MyApp.
I can verify subsequently that all of the threads within 'MyApp' have been constrained to run on core 1 (of a multi-core) CPU.
I have a number of applications I wish to launch using a programme that reads, from a text file: (1) the application name (2) the core to which is should be constrained to run.
I've constructed the equivalent text string, and pass this string to spawn() in the argv[] array.
The pterm is launched, but it displays an error message:
Cannot start program 'on -C 1 ' (No such file or directory)
If I try to supply additional args that are valid for pterm (e.g. pterm -z -r ), followed by 'on -C 1 ./MyApp' the error message is:
pterm: illegal option --
Does anyone know how I can use spawn to replicate the command string that I've shown to work from within a batch file?
Thanks in advance.Jim Baddoo2012-09-25T15:39:45Zpost95607: Re: Good reasons for pthread_spin_init() failure with EBUSY?Davide Ancrihttp://community.qnx.com/sf/go/post956072012-09-17T15:22:48Z2012-09-17T15:22:48ZSorry, does anyone have an hint or idea for this?
I applied all possible attentions allocating the memory, initilizing the pthread_spin_t and rleasing the memory when done, but I still get the init error with EBUSY.
thanks,
DavideDavide Ancri2012-09-17T15:22:48Zpost95488: RE: ISR on SMPMario Charesthttp://community.qnx.com/sf/go/post954882012-09-10T18:37:56Z2012-09-10T18:37:56Z> -----Message d'origine-----
> De : Javier A. [mailto:community-noreply@qnx.com]
> Envoyé : 10 septembre 2012 13:28
> À : ostech-core_os
> Objet : Re: ISR on SMP
>
> Hi guys,
> Thank you for the update.
>
> Here is what I am doing right now.
>
>
> volatile qtime_entry* qtime_ptr_;
>
There is no need to use mmap, qtime is already mmaped for you
> //-Map the qtime kernel struct to local memory void init_memory(){
> struct qtime_entry* kernel_qtime = SYSPAGE_ENTRY ( qtime );
> off64_t offset = 0;
> if( -1 == mem_offset64(kernel_qtime, NOFD, sizeof(qtime_entry), &offset,
> 0)){
> fprintf(stderr, "Failed to get phyaddr %s\n", strerror(errno));
> exit(EXIT_FAILURE);
> }
> printf("Qtime physical addr 0x%x\n", offset);
> qtime_ptr_ = (struct qtime_entry*) mmap_device_memory(0,
> sizeof(qtime_entry), PROT_READ | PROT_WRITE | PROT_NOCACHE, 0, offset);
> if (qtime_ptr_ == MAP_FAILED){
> fprintf(stderr, "Failed to map qtime %s\n", strerror(errno));
> exit(EXIT_FAILURE);
> }
> }
>
> //-ISR
> const struct sigevent * isr(void* p, int id) {
> //If not interrupt pending on my HW return NULL
> .....
I don't see the point of disabling the interrupt
> //-Disable timing interrupt
> InterruptMask(qtime_ptr_->intr, -1);
> //-Read until there is no change (this will ensure the clock is not in the
> middle of an update)
> uint64_t current_nsec;
> do{
> current_nsec = qtime_ptr_->nsec;
> } while (qtime_ptr_->nsec != current_nsec);
>
I have no idea if this is allowed or supported
> //-Adjust clock (set it to next_time_sec & next_time_nsec)
> qtime_ptr_->nsec_tod_adjust = (next_time_sec * 1000000000) +
> next_time_nsec - current_nsec;
> InterruptUnmask(qtime_ptr_->intr, -1);
>
> //-Fire event
> return (&intr_event_);
>
> }
>
> If the 2 ISRs can run concurrently the only way to do a proper synchronization
> would be to share a spinlock (which I do believe QNX has it but is only
> internal to the Kernel). So far this is the best I ca do. If you have any ideas or
> critics go ahead…
>
> Javier
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post95486
> To cancel your subscription to this discussion, please e-mail ostech-core_os-
> unsubscribe@community.qnx.comMario Charest2012-09-10T18:37:56Zpost95486: Re: ISR on SMPJavier A.http://community.qnx.com/sf/go/post954862012-09-10T17:27:40Z2012-09-10T17:27:40ZHi guys,
Thank you for the update.
Here is what I am doing right now.
volatile qtime_entry* qtime_ptr_;
//-Map the qtime kernel struct to local memory
void init_memory(){
struct qtime_entry* kernel_qtime = SYSPAGE_ENTRY ( qtime );
off64_t offset = 0;
if( -1 == mem_offset64(kernel_qtime, NOFD, sizeof(qtime_entry), &offset, 0)){
fprintf(stderr, "Failed to get phyaddr %s\n", strerror(errno));
exit(EXIT_FAILURE);
}
printf("Qtime physical addr 0x%x\n", offset);
qtime_ptr_ = (struct qtime_entry*) mmap_device_memory(0, sizeof(qtime_entry), PROT_READ | PROT_WRITE | PROT_NOCACHE, 0, offset);
if (qtime_ptr_ == MAP_FAILED){
fprintf(stderr, "Failed to map qtime %s\n", strerror(errno));
exit(EXIT_FAILURE);
}
}
//-ISR
const struct sigevent * isr(void* p, int id) {
//If not interrupt pending on my HW return NULL
.....
//-Disable timing interrupt
InterruptMask(qtime_ptr_->intr, -1);
//-Read until there is no change (this will ensure the clock is not in the middle of an update)
uint64_t current_nsec;
do{
current_nsec = qtime_ptr_->nsec;
} while (qtime_ptr_->nsec != current_nsec);
//-Adjust clock (set it to next_time_sec & next_time_nsec)
qtime_ptr_->nsec_tod_adjust = (next_time_sec * 1000000000) + next_time_nsec - current_nsec;
InterruptUnmask(qtime_ptr_->intr, -1);
//-Fire event
return (&intr_event_);
}
If the 2 ISRs can run concurrently the only way to do a proper synchronization would be to share a spinlock (which I do believe QNX has it but is only internal to the Kernel). So far this is the best I ca do. If you have any ideas or critics go ahead…
JavierJavier A.2012-09-10T17:27:40Zpost95485: Re: ISR on SMPOleh Derevenkohttp://community.qnx.com/sf/go/post954852012-09-10T17:12:00Z2012-09-10T17:12:00Z> This is my scenario: I receive a pulse to do time correction so when I am
> reading/writing the qtime (nsec) I would like to make sure I am not in the
> middle of an update of the system clock.
Just read time in loop util you get two matching values in a row.Oleh Derevenko2012-09-10T17:12:00Zpost95480: Re: ISR on SMPWill Mileshttp://community.qnx.com/sf/go/post954802012-09-10T16:19:40Z2012-09-10T16:19:40ZHi Javier,
I am not a QNX employee, but my intial recommendation would be to suggest using InterruptAttachEvent() and a very very high priority user-mode thread that just calls clock_gettime(), which just uses the kernel's internal code to ensure interlocking with the tick interrupt. It you've got the ability to measure the latency, it might be worth benchmarking the latency of using that approach instead of an InterruptAttach() interrupt handler - there are a lot fewer restrictions on what you can do in your handler, and it makes debugging much easier.
Assuming that InterruptAttachEvent() adds measurable delay that your application cannot tolerate, the next recommendation would be to do as the kernel does internally, and just inspect the time in a loop to make sure it hasn't changed (and therefore you have an atomic read!):
Here is some example code (untested from memory, so you might have to fix it up):
void get_current_time(uint64_t* time_out, int include_time_of_day) {
volatile uint64_t* nsec_vol = &(SYSPAGE_ENTRY(qtime)->nsec);
int64_t adjust;
do {
*time_out = *nsec_vol;
adjust = SYSPAGE_ENTRY(qtime)->nsec_tod_adjust;
} while (*time_out != *nsec_vol);
if (include_time_of_day) *time_out += adjust;
}
Hope this helps some,
-WillWill Miles2012-09-10T16:19:40Zpost95478: Re: ISR on SMPJavier A.http://community.qnx.com/sf/go/post954782012-09-10T15:54:03Z2012-09-10T15:54:03ZIs there any QNX system guy on this forum?
Thank you...Javier A.2012-09-10T15:54:03Zpost95477: Re: ISR on SMPJavier A.http://community.qnx.com/sf/go/post954772012-09-10T15:39:51Z2012-09-10T15:39:51ZAfter running test.
Conclusion: Concurrent ISR.
Question: Is there any way top avoid the clock ISR to be running concurrently?
Any help is appreciated :)
JavierJavier A.2012-09-10T15:39:51Zpost95475: Re: Good reasons for pthread_spin_init() failure with EBUSY?Davide Ancrihttp://community.qnx.com/sf/go/post954752012-09-10T15:10:19Z2012-09-10T15:10:19ZAnother hypothesis
when a pthread_spinlock_t gets initialized with pthread_spin_init(PTHREAD_PROCESS_PRIVATE), does it get automatically destroyed if the owner process exits without explicitly calling pthread_spin_destroy()?
If not, this can be an explanation of my problem. And a lack of kernel rensonsibilities ;)
DavideDavide Ancri2012-09-10T15:10:19Zpost95469: HAM heartbeat for external attach entitiesChristophe Thiblothttp://community.qnx.com/sf/go/post954692012-09-10T14:31:45Z2012-09-10T14:31:45ZHi,
Is there a way for a process, externally attached to HAM, to become self-attached without loosing the potential conditions and actions sets to HAM during the initial external attachment.
The idea behind is to have all the necessary processes for an application to be started externally attached to the HAM, and to let the "smart enough" processes choose themselves to use the heartbeat.
Thank's
ChristopheChristophe Thiblot2012-09-10T14:31:45Zpost95467: Re: Good reasons for pthread_spin_init() failure with EBUSY?Davide Ancrihttp://community.qnx.com/sf/go/post954672012-09-10T13:22:27Z2012-09-10T13:22:27Zhi, it's me again
I took a look to the kernel sources, to find out possible ideas, and it seems that it can fail only for a couple of reasons, here:
function: synchash_add()
module: services/system/ker/nano_sync.c
reason 1)
_scalloc() can't find new memory for the secondary hash table.
This seems too strange to me: why always (and only) in front of my pthread_spin_init()?
reason 2)
the physical address of my pthread_spinlock_t object leads to something already present in the hash table.
This sounds impossible since I'm initializing the pthread_spinlock_t into memory just allocated from the kernel (I call mmap64() directly, asking for physically contiguous ram), so noone else can hold that memory page.
In fact, trying to understand the hashing rules, I see that only 23 bits of the physical mutex address are taken into account: can this be the probem? For sure I have some pthread_spinlock_t in other running processes...
thanks for any help!
DavideDavide Ancri2012-09-10T13:22:27Zpost95458: ISR on SMPJavier A.http://community.qnx.com/sf/go/post954582012-09-07T20:39:41Z2012-09-07T20:39:41ZHi,
I have a question:
When running on a SMP configuration, could I have concurrent ISRs running on each processor?
This is my scenario: I receive a pulse to do time correction so when I am reading/writing the qtime (nsec) I would like to make sure I am not in the middle of an update of the system clock.
Thank you,
JavierJavier A.2012-09-07T20:39:41Zpost95451: Re: RE: Query the kernel about physical memory allocation and availabilityDavide Ancrihttp://community.qnx.com/sf/go/post954512012-09-07T15:47:54Z2012-09-07T15:47:54Zbut I can;t see "-Dm" option there...
> 6.5.0 Service Pack 1 has a much better doc for showmem:
>
> http://www.qnx.com/developers/docs/6.5.0_sp1/topic/com.qnx.doc.
> neutrino_utilities/s/showmem.html?cp=13_13_21_15Davide Ancri2012-09-07T15:47:54Zpost95450: Re: Good reasons for pthread_spin_init() failure with EBUSY?Davide Ancrihttp://community.qnx.com/sf/go/post954502012-09-07T15:46:31Z2012-09-07T15:46:31ZI omitted to say: I run qnx 6.4.1
> I have a sporadic failing pthread_spin_init() with errno=EBUSY, where the
> spinner is located in a piece of ram to be shared with another process
> (PTHREAD_PROCESS_SHARED flag is used, for this reason).Davide Ancri2012-09-07T15:46:31Zpost95449: Re: Query the kernel about physical memory allocation and availabilityDavide Ancrihttp://community.qnx.com/sf/go/post954492012-09-07T15:42:27Z2012-09-07T15:42:27ZGreat!
unfortunately, I forgot to say that I run qnx 6.4.1, where showmem is much more limited.
But I'm happy to know it have been improved ;)
thanks
Davide
> showmem -Dm
> http://www.qnx.com/developers/docs/6.5.0/index.jsp?topic=/com.qnx.doc.
> neutrino_utilities/s/showmem.htmlDavide Ancri2012-09-07T15:42:27Zpost95448: RE: Query the kernel about physical memory allocation and availabilitySteve Reidhttp://community.qnx.com/sf/go/post954482012-09-07T15:41:30Z2012-09-07T15:41:30Z6.5.0 Service Pack 1 has a much better doc for showmem:
http://www.qnx.com/developers/docs/6.5.0_sp1/topic/com.qnx.doc.neutrino_utilities/s/showmem.html?cp=13_13_21_15
Steve Reid (stever@qnx.com<mailto:stever@qnx.com>)
Technical Editor
QNX Software Systems
From: Mate Szarvas [mailto:community-noreply@qnx.com]
Sent: Friday, September 07, 2012 11:28 AM
To: ostech-core_os@community.qnx.com
Subject: Re: Query the kernel about physical memory allocation and availability
showmem -Dm
http://www.qnx.com/developers/docs/6.5.0/index.jsp?topic=/com.qnx.doc.neutrino_utilities/s/showmem.html
use showmem:
showmem [options] - display memory information
-S Show memory summary (free/used) for the system
-P Show process/sharedlibrary/ summary for the system
-D[lshm] Show detailed process information
l = libraries/binaries
s = stack
h = heap
m = memory mapping
-d file Dump the raw map information to specified file
-v Increase the verbosity of the output
From: Davide Ancri <community-noreply@qnx.com<mailto:community-noreply@qnx.com>>
Reply-To: <ostech-core_os@community.qnx.com<mailto:ostech-core_os@community.qnx.com>>
Date: Fri, 7 Sep 2012 11:27:01 -0400
To: ostech-core_os <ostech-core_os@community.qnx.com<mailto:ostech-core_os@community.qnx.com>>
Subject: Query the kernel about physical memory allocation and availability
hi all
is there a way to know the current state (allocation/fragmentation/availability) of the physical memory?
Something like "sin pmem" on old qnx4... but more complete about physical addresses if possible ;)
thanks
Davide
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post95445
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com<mailto:ostech-core_os-unsubscribe@community.qnx.com>Steve Reid2012-09-07T15:41:30Zpost95447: Good reasons for pthread_spin_init() failure with EBUSY?Davide Ancrihttp://community.qnx.com/sf/go/post954472012-09-07T15:33:48Z2012-09-07T15:33:48Zhi
I have a sporadic failing pthread_spin_init() with errno=EBUSY, where the spinner is located in a piece of ram to be shared with another process (PTHREAD_PROCESS_SHARED flag is used, for this reason).
Can you tell me the possible reason for EBUSY error?
By the way: I 0-memset the spinner area right before calling pthread_spin_init().
thanks!
DavideDavide Ancri2012-09-07T15:33:48Zpost95446: Re: Query the kernel about physical memory allocation and availabilityMate Szarvashttp://community.qnx.com/sf/go/post954462012-09-07T15:32:31Z2012-09-07T15:32:31Zshowmem -Dm
http://www.qnx.com/developers/docs/6.5.0/index.jsp?topic=/com.qnx.doc.neutrino_utilities/s/showmem.html
use showmem:
showmem [options] - display memory information
-S Show memory summary (free/used) for the system
-P Show process/sharedlibrary/ summary for the system
-D[lshm] Show detailed process information
l = libraries/binaries
s = stack
h = heap
m = memory mapping
-d file Dump the raw map information to specified file
-v Increase the verbosity of the output
From: Davide Ancri <community-noreply@qnx.com<mailto:community-noreply@qnx.com>>
Reply-To: <ostech-core_os@community.qnx.com<mailto:ostech-core_os@community.qnx.com>>
Date: Fri, 7 Sep 2012 11:27:01 -0400
To: ostech-core_os <ostech-core_os@community.qnx.com<mailto:ostech-core_os@community.qnx.com>>
Subject: Query the kernel about physical memory allocation and availability
hi all
is there a way to know the current state (allocation/fragmentation/availability) of the physical memory?
Something like "sin pmem" on old qnx4... but more complete about physical addresses if possible ;)
thanks
Davide
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post95445
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com<mailto:ostech-core_os-unsubscribe@community.qnx.com>Mate Szarvas2012-09-07T15:32:31Zpost95445: Query the kernel about physical memory allocation and availabilityDavide Ancrihttp://community.qnx.com/sf/go/post954452012-09-07T15:27:01Z2012-09-07T15:27:01Zhi all
is there a way to know the current state (allocation/fragmentation/availability) of the physical memory?
Something like "sin pmem" on old qnx4... but more complete about physical addresses if possible ;)
thanks
DavideDavide Ancri2012-09-07T15:27:01Zpost95365: Detecting HID devices in non-default configurationsAndy Pearcehttp://community.qnx.com/sf/go/post953652012-09-04T17:11:29Z2012-09-04T17:11:29ZHello,
I'm trying to write a client of the io-hid manager to support devices which only present a HID interface in a non-default USB configuration. I was having a problem that io-hid didn't trigger insertions for the device, even when I used an enum-usb script to place it in the correct USB configuration.
I've discovered a work-around which is to write an enum-devices script to re-mount devh-usb.so on io-hid, which seems to trigger the correct insertion callback in my client code. However, this has the unwanted side-effect of causing all existing HID devices to be removed and then re-inserted (only at the io-hid interface, not at the USB level). This causes me problems since the devices are stateful and if I connect to them as if they were newly inserted then the negotiation will fail.
Could anybody suggest a way to cause devh-usb.so to re-scan for new HID devices in a way which doesn't disconnect already-connected ones?
It appears that whatever scan it does at startup detects devices with a HID interface in their current configuration, but after this initial scan it only seems to be notified of new devices if they have a HID interface in their *default* configuration. If I can find a way to trigger whatever scan it does at startup without causing removal notifications for existing devices, I can trigger this from my enum-devices script and the problem will be solved.
Any ideas anyone could share would be very gratefully received.Andy Pearce2012-09-04T17:11:29Zpost95322: Re: 6.5.0SP1 devc-ser8250 errorBill Xiahttp://community.qnx.com/sf/go/post953222012-09-01T10:11:56Z2012-09-01T10:11:56ZI encoutered the situation too. But I solved the issue successfully.
Please using "mkifs" to make a new image under SP1 enviroment, and please using new image to cover the old version "/.boot", then reboot again. You can't see this message again.Bill Xia2012-09-01T10:11:56Zpost95321: Re: devc-ser8250 driverBill Xiahttp://community.qnx.com/sf/go/post953212012-09-01T10:11:42Z2012-09-01T10:11:42ZI encoutered the situation too. But I solved the issue successfully.
Please using "mkifs" to make a new image under SP1 enviroment, and please using new image to cover the old version "/.boot", then reboot again. You can't see this message again.Bill Xia2012-09-01T10:11:42Zpost95320: Re: 6.5.0SP1 devc-ser8250 errorBill Xiahttp://community.qnx.com/sf/go/post953202012-09-01T10:11:05Z2012-09-01T10:11:05ZI encoutered the situation too. But I solved the issue successfully.
Please using "mkifs" to make a new image under SP1 enviroment, and please using new image to cover the old version "/.boot", then reboot again. You can't see this message again.Bill Xia2012-09-01T10:11:05Zpost95254: Re: Setting up QNX to mount a disk.Gervais Mulongoyhttp://community.qnx.com/sf/go/post952542012-08-29T13:07:20Z2012-08-29T13:07:20ZThe build file included in the x86 BSP for 6.5.0 is a good place to start.Gervais Mulongoy2012-08-29T13:07:20Zpost95252: OS clock sync up with Real time clock, at Boot upJayakumar Gopalakrishnanhttp://community.qnx.com/sf/go/post952522012-08-29T12:47:37Z2012-08-29T12:47:37ZI'm using QNX6.2.0. At boot-up i'm observing, that my OS clock is lagging from the RT clock by a few seconds. later if i run "rtc hw" and read the OS clock value, there is no error in the OS clock it gets rectified.
This behavior is observed consistently at Low temperatures, temperatures below 20 degree C. if i switch Off the system for 20mins or more and power ON, i get this issue.
If the temperature is more, say around 25, then issue is observed around 30mins, switch Off time.
Questions:
1. Is the IPL responsible for the initial sync up?, i'm not doing any RTC sync up in my boot script.
2. Can anyone help me in this regard?Jayakumar Gopalakrishnan2012-08-29T12:47:37Zpost95235: Setting up QNX to mount a disk.Mark Bangerthttp://community.qnx.com/sf/go/post952352012-08-28T20:48:42Z2012-08-28T20:48:42ZI just went throught the process of creating a bootable hard drive and putting an ifs image on it and booting my system. All is well there. The next thing I need to do is reconfigure QNX to start the disk drivers and mount the disk that I just booted from.
My hardware confiquration is an x86 board with a SATA HD. What drivers do I need to include and start?
Is there a good basic example I can follow.
Regards,
MarkMark Bangert2012-08-28T20:48:42Zpost94892: Re: 6.5.0SP1 devc-ser8250 errorMark Dowdyhttp://community.qnx.com/sf/go/post948922012-08-16T16:35:53Z2012-08-16T16:35:53ZHmm, when I ran mkifs with -vvvv, everything look OK (see below). I tried the 'quad-v' image on the system and the error was gone. I'm at a loss to explain the difference between the two mkifs runs. Thanks for the help.
Here's output from mkifis.
>mkifs -vvvv mccsmp.build mccsmp.ifs
Offset Size Entry Ramoff Target=Host
400000 440 0 --- c:/QNX/QNX650SP1/target/qnx6/x86/boot/sys/bios.boot
Execute: ldrel -s!* -p -l -t 0x400540 "c:/QNX/QNX650SP1/target/qnx6/x86/boot/sys/startup-bios" "C:\DOCUME~1\MARK_D~1\LOCALS~1\Temp\Q538041a7b55.tmp"
Execute: ntox86-ld -T%QNX_TARGET%/x86/lib/nto.link -Ttext 0xf0018000 -o"C:\DOCUME~1\MARK_D~1\LOCALS~1\Temp\Q538041a7bf2.tmp" "c:/QNX/QNX650SP1/target/qnx6/x86/boot/sys/procnto-smp-instr"
400440 100 ---- --- Startup-header
400540 159d0 404e38 --- C:\DOCUME~1\MARK_D~1\LOCALS~1\Temp\Q538041a7b55.tmp (1297385664)
415ad0 5c ---- --- Image-header
415b2c 580 ---- --- Image-directory
4160ac 26c ---- --- proc/boot/startup-script=C:\DOCUME~1\MARK_D~1\LOCALS~1/Temp\Q538041a7b05.tmp
416318 12 ---- --- proc/boot/unlink_list=C:\DOCUME~1\MARK_D~1\LOCALS~1Temp\Q538041a7b35.tmp (449623294)
417000 91000 f0051578 --- proc/boot/procnto-smp-instr=C:\DOCUME~1\MARK_D~1\LOCALS~1\Temp\Q538041a7bf2.tmp (1619586354)
4a8000 7dc90 3f9e0 --- proc/boot/libc.so.3=c:/QNX/QNX650SP1/target/qnx6/x86/lib/libc.so (3216559672)
---- --- ---- --- proc/boot/libc.so=libc.so.3 (3216559672)
526000 6f46 19e0 --- proc/boot/libhiddi.so.1=c:/QNX/QNX650SP1/target/qnx6/x86/lib/libhiddi.so (1832649318)
---- --- ---- --- proc/boot/libhiddi.so=libhiddi.so.1 (1832649318)
52d000 139a8 41d0 --- proc/boot/libcam.so.2=c:/QNX/QNX650SP1/target/qnx6/x86/lib/libcam.so (1067910505)
---- --- ---- --- proc/boot/libcam.so=libcam.so.2 (1067910505)
541000 7d8ec 67c0 --- proc/boot/io-blk.so=c:/QNX/QNX650SP1/target/qnx6/x86/lib/dll/io-blk.so (3672287797)
5bf000 4102 c90 --- proc/boot/cam-disk.so=c:/QNX/QNX650SP1/target/qnx6/x86/lib/dll/cam-disk.so (1894384287)
5c4000 11ff6 1d90 --- proc/boot/fs-qnx6.so=c:/QNX/QNX650SP1/target/qnx6/x86/lib/dll/fs-qnx6.so (4285932322)
5d6000 13a52 1f50 --- proc/boot/fs-dos.so=c:/QNX/QNX650SP1/target/qnx6/x86/lib/dll/fs-dos.so (1446027264)
5ea000 dc15 17e0 --- proc/boot/fs-ext2.so=c:/QNX/QNX650SP1/target/qnx6/x86/lib/dll/fs-ext2.so (4123902041)
5f8000 5782 e40 --- proc/boot/cam-cdrom.so=c:/QNX/QNX650SP1/target/qnx6/x86/lib/dll/cam-cdrom.so (2809581546)
5fe000 c0f4 1680 --- proc/boot/fs-cd.so=c:/QNX/QNX650SP1/target/qnx6/x86/lib/dll/fs-cd.so (2612837027)
60b000 1585a 21b0 --- proc/boot/fs-udf.so=c:/QNX/QNX650SP1/target/qnx6/x86/lib/dll/fs-udf.so (3998463212)
621000 e586 2730 --- proc/boot/devh-ps2ser.so=c:/QNX/QNX650SP1/target/qnx6/x86/lib/dll/devh-ps2ser.so (669043340)
630000 32f5 8048998 --- proc/boot/seedres=c:/QNX/QNX650SP1/target/qnx6/x86/sbin/seedres (704932111)
634000 fc12 80492c8 --- proc/boot/pci-bios=c:/QNX/QNX650SP1/target/qnx6/x86/sbin/pci-bios 3446572288)
644000 1a56b 8049c18 --- proc/boot/devb-eide=c:/QNX/QNX650SP1/target/qnx6/x86sbin/devb-eide (823001228)
65f000 82e2 8049ca8 --- proc/boot/io-hid=c:/QNX/QNX650SP1/target/qnx6/x86/sbin/io-hid 1977451559)
668000 3afb 8048f08 --- proc/boot/slogger=c:/QNX/QNX650SP1/target/qnx6/x86/usr/sbin/slogger (3139326079)
66c000 5386 8049428 --- proc/boot/fesh=c:/QNX/QNX650SP1/target/qnx6/x86/bin/fesh (4152905123)
672000 1ab73 804a338 --- proc/boot/devc-con-hid=c:/QNX/QNX650SP1/target/qnx6/x86/sbin/devc-con-hid (585756925)
68cb74 4 ---- --- Image-trailerMark Dowdy2012-08-16T16:35:53Zpost94883: RE: 6.5.0SP1 devc-ser8250 errorChris Travishttp://community.qnx.com/sf/go/post948832012-08-16T13:13:43Z2012-08-16T13:13:43ZSomething must have gone wrong with your build of the new image(didn't use the 650SP1 installed bins/libs)....what is the output from running mkifs with -vvvv option.
Also, what is the output from the following on your 2 machines?
ls -l /.boot
From: Mark Dowdy [mailto:community-noreply@qnx.com]
Sent: August-15-12 8:53 PM
To: ostech-core_os@community.qnx.com
Subject: 6.5.0SP1 devc-ser8250 error
I installed 6.5.0 SP1 on my target machine, and my windows development machine, and built an updated boot file. When I attempt to load my boot file, I get the following error:
ldd:FATAL: Unresolved symbol "hwi_find_item" called from Executable
I saw topc22117 and collected the information below. As far as I know, this is not a pre-release version of SP1; I pulled qnxsdp-6.5.0SP1-201206270843-nto.sh and qnxsdp-6.5.0SP1-201206261830-win32.exe from qnx.com on August 6th.
# use -i libc.so.3
NAME=libc.so
DESCRIPTION=C runtime library
DATE=2010/07/09-12:54:28-EDT
STATE=stable
HOST=mainbuild
USER=builder
VERSION=6.5.0
TAGID=89
# uname -a
QNX MCC 6.5.0 2010/07/09-14:44:03EDT x86pc x86
MCC# use -i /proc/boot/libc.so
NAME=libc.so
DESCRIPTION=C runtime library
DATE=2010/07/09-12:54:28-EDT
STATE=stable
HOST=mainbuild
USER=builder
VERSION=6.5.0
TAGID=89
# ls -l /proc/boot
total 4268
-rwxrwxrwx 1 root root 22294 Jul 09 2010 cam-cdrom.so
-rwxrwxrwx 1 root root 13738 Jul 09 2010 cam-disk.so
-rwxrwxrwx 1 root root 107156 Jul 09 2010 devb-eide
-rwxrwxrwx 1 root root 107815 Jul 09 2010 devc-con-hid
-rwxrwxrwx 1 root root 58750 Jul 09 2010 devh-ps2ser.so
-rwxrwxrwx 1 root root 21382 Jul 09 2010 fesh
-rwxrwxrwx 1 root root 49356 Jul 09 2010 fs-cd.so
-rwxrwxrwx 1 root root 78433 Jul 09 2010 fs-dos.so
-rwxrwxrwx 1 root root 56333 Jul 09 2010 fs-ext2.so
-rwxrwxrwx 1 root root 72902 Jul 09 2010 fs-qnx6.so
-rwxrwxrwx 1 root root 85618 Jul 09 2010 fs-udf.so
-rwxrwxrwx 1 root root 169908 Jul 09 2010 io-blk.so
-rwxrwxrwx 1 root root 33170 Jul 09 2010 io-hid
lrwxrwxrwx 1 root root 9 Jul 09 2010 libc.so -> libc.so.3
-rwxrwxrwx 1 root root 513152 Jul 09 2010 libc.so.3
lrwxrwxrwx 1 root root 11 Jul 09 2010 libcam.so -> libcam.so.2
-rwxrwxrwx 1 root root 73504 Jul 09 2010 libcam.so.2
lrwxrwxrwx 1 root root 13 Jul 09 2010 libhiddi.so -> libhiddi.so.1
-rwxrwxrwx 1 root root 27906 Jul 09 2010 libhiddi.so.1
-rwxrwxrwx 1 root root 64148 Jul 09 2010 pci-bios
-rwxrwxrwx 1 root root 593920 Jul 09 2010 procnto-smp-instr
-rwxrwxrwx 1 root root 13001 Jul 09 2010 seedres
-rwxrwxrwx 1 root root 14636 Jul 09 2010 slogger
-rw-rw-rw- 1 root root 620 May 06 2011 startup-script
-rw-rw-rw- 1 root root 18 May 06 2011 unlink_list
As was the case in topc22117, it looks like the binaries are 'old'. Why is that? Is there more required to install SP1 than running the .exe on my development machine and the .sh on my target? Thanks.
MarkChris Travis2012-08-16T13:13:43Zpost94882: Re: 6.5.0SP1 devc-ser8250 errorGervais Mulongoyhttp://community.qnx.com/sf/go/post948822012-08-16T12:57:00Z2012-08-16T12:57:00ZNot sure why this wasn't installed on your hosts but you probably need
the SP1 libc.so (see attached).Gervais Mulongoy2012-08-16T12:57:00Zpost94872: 6.5.0SP1 devc-ser8250 errorMark Dowdyhttp://community.qnx.com/sf/go/post948722012-08-16T00:54:20Z2012-08-16T00:54:20ZI installed 6.5.0 SP1 on my target machine, and my windows development machine, and built an updated boot file. When I attempt to load my boot file, I get the following error:
ldd:FATAL: Unresolved symbol "hwi_find_item" called from Executable
I saw topc22117 and collected the information below. As far as I know, this is not a pre-release version of SP1; I pulled qnxsdp-6.5.0SP1-201206270843-nto.sh and qnxsdp-6.5.0SP1-201206261830-win32.exe from qnx.com on August 6th.
# use -i libc.so.3
NAME=libc.so
DESCRIPTION=C runtime library
DATE=2010/07/09-12:54:28-EDT
STATE=stable
HOST=mainbuild
USER=builder
VERSION=6.5.0
TAGID=89
# uname -a
QNX MCC 6.5.0 2010/07/09-14:44:03EDT x86pc x86
MCC# use -i /proc/boot/libc.so
NAME=libc.so
DESCRIPTION=C runtime library
DATE=2010/07/09-12:54:28-EDT
STATE=stable
HOST=mainbuild
USER=builder
VERSION=6.5.0
TAGID=89
# ls -l /proc/boot
total 4268
-rwxrwxrwx 1 root root 22294 Jul 09 2010 cam-cdrom.so
-rwxrwxrwx 1 root root 13738 Jul 09 2010 cam-disk.so
-rwxrwxrwx 1 root root 107156 Jul 09 2010 devb-eide
-rwxrwxrwx 1 root root 107815 Jul 09 2010 devc-con-hid
-rwxrwxrwx 1 root root 58750 Jul 09 2010 devh-ps2ser.so
-rwxrwxrwx 1 root root 21382 Jul 09 2010 fesh
-rwxrwxrwx 1 root root 49356 Jul 09 2010 fs-cd.so
-rwxrwxrwx 1 root root 78433 Jul 09 2010 fs-dos.so
-rwxrwxrwx 1 root root 56333 Jul 09 2010 fs-ext2.so
-rwxrwxrwx 1 root root 72902 Jul 09 2010 fs-qnx6.so
-rwxrwxrwx 1 root root 85618 Jul 09 2010 fs-udf.so
-rwxrwxrwx 1 root root 169908 Jul 09 2010 io-blk.so
-rwxrwxrwx 1 root root 33170 Jul 09 2010 io-hid
lrwxrwxrwx 1 root root 9 Jul 09 2010 libc.so -> libc.so.3
-rwxrwxrwx 1 root root 513152 Jul 09 2010 libc.so.3
lrwxrwxrwx 1 root root 11 Jul 09 2010 libcam.so -> libcam.so.2
-rwxrwxrwx 1 root root 73504 Jul 09 2010 libcam.so.2
lrwxrwxrwx 1 root root 13 Jul 09 2010 libhiddi.so -> libhiddi.so.1
-rwxrwxrwx 1 root root 27906 Jul 09 2010 libhiddi.so.1
-rwxrwxrwx 1 root root 64148 Jul 09 2010 pci-bios
-rwxrwxrwx 1 root root 593920 Jul 09 2010 procnto-smp-instr
-rwxrwxrwx 1 root root 13001 Jul 09 2010 seedres
-rwxrwxrwx 1 root root 14636 Jul 09 2010 slogger
-rw-rw-rw- 1 root root 620 May 06 2011 startup-script
-rw-rw-rw- 1 root root 18 May 06 2011 unlink_list
As was the case in topc22117, it looks like the binaries are 'old'. Why is that? Is there more required to install SP1 than running the .exe on my development machine and the .sh on my target? Thanks.
MarkMark Dowdy2012-08-16T00:54:20Zpost94812: Re: setrlimit behaviourGervais Mulongoyhttp://community.qnx.com/sf/go/post948122012-08-14T17:08:47Z2012-08-14T17:08:47ZThe gear in the kernel appears to be in place to set limits on a given process, what's missing is the extension to libc, something like prlimit() on linux.Gervais Mulongoy2012-08-14T17:08:47Zpost94809: setrlimit behaviourAndy Grychttp://community.qnx.com/sf/go/post948092012-08-14T15:49:21Z2012-08-14T15:49:21ZI've never used this function, but I had a question about its use in restricting a launched program's memory allocation. In reading the docs (http://www.qnx.com/developers/docs/6.3.0SP3/neutrino/lib_ref/s/setrlimit.html ), I think that it would work like this:
Controlling program calls setrlimit to lower RLIMIT_DATA
Controller then launches child process
Child process inherits new lower rlimit
Controller calls setrlimit again to bump limit back to normal.
I have three questions:
1. Is my interpretation of setrlimit the proper way to spawn a child process with restricted memory limits?
2. What happens if the controlling app lowers the RLIMIT_DATA below what memory it's actually using? My interpretation is that the next heap alloc through brk() will fail, which means that you better not do this if you're multi-threaded unless you can guarantee no other threads will alloc memory.
3. Is there any way to inject an rlimit into an already running process?Andy Gryc2012-08-14T15:49:21Zpost94754: RE: TimerTimeout() not getting timeoutLichun Zhuhttp://community.qnx.com/sf/go/post947542012-08-10T14:48:45Z2012-08-10T14:48:45ZIdeally if this is a single threaded resmgr, the devctl handler should not block if it's waiting for something say there is no data available at the time, then save the ctp->rcvid for later reply and return _RESMGR_NOREPLY, then you don't have to create another thread for that.
> -----Original Message-----
> From: David Sarrazin [mailto:community-noreply@qnx.com]
> Sent: August-10-12 10:41 AM
> To: ostech-core_os@community.qnx.com
> Subject: RE: TimerTimeout() not getting timeout
>
> Simplest way to is to MsgError(ctp->rcvid), which will unblock the client. It's
> then very important for your resource manager to keep track of the fact that it
> has already replied, and either abort the current operation, or simply skip over
> the MsgReply that happens when the devctl thread finishes.
>
> > -----Original Message-----
> > From: Fraser Moore [mailto:community-noreply@qnx.com]
> > Sent: August-10-12 10:39 AM
> > To: ostech-core_os@community.qnx.com
> > Subject: Re: TimerTimeout() not getting timeout
> >
> > I can now get io_unblock to be called from a separate thread but how
> > do I then reply to the client which is blocked on another thread to unblock it?
> >
> > cheers,
> > fraser
> >
> > On 10/08/2012 10:43, Thomas Haupt wrote:
> > > Hi Fraser,
> > >
> > > sure, feel free.
> > >
> > > Cheers,
> > > Thomas
> > >
> > > -----Original Message-----
> > > From: Fraser Moore [mailto:community-noreply@qnx.com]
> > > Sent: Freitag, 10. August 2012 10:37
> > > To: ostech-core_os@community.qnx.com
> > > Subject: Re: TimerTimeout() not getting timeout
> > >
> > > Hi Thomas, I think that's exactly what's happening. I had just
> > > been reading
> > the about this in the documentation. I will try and create a new
> > thread to handle this.
> > >
> > > I may be back for more advice.
> > >
> > > Thanks,
> > > Fraser
> > >
> > > On 10/08/2012 09:25, Thomas Haupt wrote:
> > >> The io_unblock callout will only be invoked when you get back to
> > >> your
> > resource manager's main loop (dispatch_block() / dispatch_handle())
> > somehow.
> > >>
> > >> If you are handling the devctl in some way such that the resource
> > manager will still be in io_devctl() when the timeout comes, no
> > unblock handling will be done.
> > >>
> > >> In order for unblocking to work properly, you need to somehow put
> > "long" (potentially blocking) tasks into the "background" and return
> > to the main message handler loop. That could mean doing them in a
> > separate thread, or adding entries on an "outstanding tasks" list that
> > you can look into when you see a state change (e.g., an interrupt signaling
> data coming in).
> > >>
> > >> Regards,
> > >> Thomas
> > >>
> > >> -----Original Message-----
> > >> From: Fraser Moore [mailto:community-noreply@qnx.com]
> > >> Sent: Freitag, 10. August 2012 09:44
> > >> To: ostech-core_os@community.qnx.com
> > >> Subject: Re: TimerTimeout() not getting timeout
> > >>
> > >> I tried defining my own io_unblock that simply calls
> > iofunc_unblock_default(). However I never see this function getting
> > called by the resource manager. I am new to writing resource managers
> > so what should I be doing to handle unblocks?
> > >>
> > >> cheers,
> > >> fraser
> > >>
> > >> On 09/08/2012 14:52, Lichun Zhu wrote:
> > >>> I think this is it, the resmgr did not handle unblock.
> > >>>
> > >>> -----Original Message-----
> > >>> From: Thomas Haupt [mailto:community-noreply@qnx.com]
> > >>> Sent: Thursday, August 09, 2012 9:44 AM
> > >>> To: 'ostech-core_os@community.qnx.com'
> > >>> Subject: RE: TimerTimeout() not getting timeout
> > >>>
> > >>> Does it do proper unblock handling?
> > >>>
> > >>> -----Original Message-----
> > >>> From: Fraser Moore [mailto:community-noreply@qnx.com]
> > >>> Sent: Donnerstag, 9. August 2012 15:40
> > >>> To: ostech-core_os@community.qnx.com
> > >>> Subject: Re: TimerTimeout() not getting timeout
> > >>>
> > >>> It is one that we have developed.
> > >>>
> > >>> On 09/08/2012 14:28, Thomas Haupt wrote:
> > >>>> What resource manager is this devctl going to?
> > >>>>
> > >>>> - Thomas
> > >>>>
> > >>>> -----Original Message-----
> > >>>> From: Fraser Moore [mailto:community-noreply@qnx.com]
> > >>>> Sent: Donnerstag, 9. August 2012 15:27
> > >>>> To: ostech-core_os@community.qnx.com
> > >>>> Subject: Re: TimerTimeout() not getting timeout
> > >>>>
> > >>>> Thanks for the reply. I had tried this but got the same results.
> > >>>>
> > >>>> On 09/08/2012 12:05, Gervais Mulongoy wrote:
> > >>>>> Try setting an unblock event instead of NULL:
> > >>>>>
> > >>>>> SIGEV_UNBLOCK_INIT(&ev);
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>> _______________________________________________
> > >>>>>
> > >>>>> OSTech
> > >>>>> http://community.qnx.com/sf/go/post94710
> > >>>>> To cancel your subscription to this discussion, please e-mail
> > >>>>> ostech-core_os-unsubscribe@community.qnx.com
> > >>>>>
> > >>>>
> > >>>> --
> > >>>> Fraser Moore
> > >>>> Abelon Systems Ltd
> > >>>> Building 4, Quantum Court, Research Avenue South, Heriot Watt
> > Research Park, Riccarton, Edinburgh EH14 4AP.
> > >>>> phone: 0131 449 9173 web: www.abelon.com
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>> _______________________________________________
> > >>>>
> > >>>> OSTech
> > >>>> http://community.qnx.com/sf/go/post94714
> > >>>> To cancel your subscription to this discussion, please e-mail
> > >>>> ostech-core_os-unsubscribe@community.qnx.com
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>> _______________________________________________
> > >>>>
> > >>>> OSTech
> > >>>> http://community.qnx.com/sf/go/post94715
> > >>>> To cancel your subscription to this discussion, please e-mail
> > >>>> ostech-core_os-unsubscribe@community.qnx.com
> > >>>>
> > >>>
> > >>> --
> > >>> Fraser Moore
> > >>> Abelon Systems Ltd
> > >>> Building 4, Quantum Court, Research Avenue South, Heriot Watt
> > Research Park, Riccarton, Edinburgh EH14 4AP.
> > >>> phone: 0131 449 9173 web: www.abelon.com
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> _______________________________________________
> > >>>
> > >>> OSTech
> > >>> http://community.qnx.com/sf/go/post94716
> > >>> To cancel your subscription to this discussion, please e-mail
> > >>> ostech-core_os-unsubscribe@community.qnx.com
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> _______________________________________________
> > >>>
> > >>> OSTech
> > >>> http://community.qnx.com/sf/go/post94717
> > >>> To cancel your subscription to this discussion, please e-mail
> > >>> ostech-core_os-unsubscribe@community.qnx.com
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> _______________________________________________
> > >>>
> > >>> OSTech
> > >>> http://community.qnx.com/sf/go/post94718
> > >>> To cancel your subscription to this discussion, please e-mail
> > >>> ostech-core_os-unsubscribe@community.qnx.com
> > >>>
> > >>
> > >> --
> > >> Fraser Moore
> > >> Abelon Systems Ltd
> > >> Building 4, Quantum Court, Research Avenue South, Heriot Watt
> > >> Research
> > Park, Riccarton, Edinburgh EH14 4AP.
> > >> phone: 0131 449 9173 web: www.abelon.com
> > >>
> > >>
> > >>
> > >>
> > >> _______________________________________________
> > >>
> > >> OSTech
> > >> http://community.qnx.com/sf/go/post94741
> > >> To cancel your subscription to this discussion, please e-mail
> > >> ostech-core_os-unsubscribe@community.qnx.com
> > >>
> > >>
> > >>
> > >>
> > >> _______________________________________________
> > >>
> > >> OSTech
> > >> http://community.qnx.com/sf/go/post94743
> > >> To cancel your subscription to this discussion, please e-mail
> > >> ostech-core_os-unsubscribe@community.qnx.com
> > >>
> > >
> > > --
> > > Fraser Moore
> > > Abelon Systems Ltd
> > > Building 4, Quantum Court, Research Avenue South, Heriot Watt
> > > Research
> > Park, Riccarton, Edinburgh EH14 4AP.
> > > phone: 0131 449 9173 web: www.abelon.com
> > >
> > >
> > >
> > >
> > > _______________________________________________
> > >
> > > OSTech
> > > http://community.qnx.com/sf/go/post94744
> > > To cancel your subscription to this discussion, please e-mail
> > > ostech-core_os-unsubscribe@community.qnx.com
> > >
> > >
> > >
> > >
> > > _______________________________________________
> > >
> > > OSTech
> > > http://community.qnx.com/sf/go/post94745
> > > To cancel your subscription to this discussion, please e-mail
> > > ostech-core_os-unsubscribe@community.qnx.com
> > >
> >
> > --
> > Fraser Moore
> > Abelon Systems Ltd
> > Building 4, Quantum Court, Research Avenue South, Heriot Watt Research
> > Park, Riccarton, Edinburgh EH14 4AP.
> > phone: 0131 449 9173 web: www.abelon.com
> >
> >
> >
> >
> > _______________________________________________
> >
> > OSTech
> > http://community.qnx.com/sf/go/post94751
> > To cancel your subscription to this discussion, please e-mail
> > ostech-core_os- unsubscribe@community.qnx.com
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post94752
> To cancel your subscription to this discussion, please e-mail ostech-core_os-
> unsubscribe@community.qnx.comLichun Zhu2012-08-10T14:48:45Zpost94753: AW: RE: TimerTimeout() not getting timeoutThomas Haupthttp://community.qnx.com/sf/go/post947532012-08-10T14:47:24Z2012-08-10T14:47:24ZOf course, that'll leave one thread blocked in io_devctl, potentially forever.
You might want to send a signal to the other thread, cancel it, or not do anything blocking in there in the first place. What operation is your devctl thread blocked on? What is it waiting for?
----- Originalnachricht -----
Von: David Sarrazin [mailto:community-noreply@qnx.com]
Gesendet: Friday, August 10, 2012 10:40 AM
An: ostech-core_os@community.qnx.com <ostech-core_os@community.qnx.com>
Betreff: RE: TimerTimeout() not getting timeout
Simplest way to is to MsgError(ctp->rcvid), which will unblock the client. It's then very important for your resource manager to keep track of the fact that it has already replied, and either abort the current operation, or simply skip over the MsgReply that happens when the devctl thread finishes.
> -----Original Message-----
> From: Fraser Moore [mailto:community-noreply@qnx.com]
> Sent: August-10-12 10:39 AM
> To: ostech-core_os@community.qnx.com
> Subject: Re: TimerTimeout() not getting timeout
>
> I can now get io_unblock to be called from a separate thread but how do I
> then reply to the client which is blocked on another thread to unblock it?
>
> cheers,
> fraser
>
> On 10/08/2012 10:43, Thomas Haupt wrote:
> > Hi Fraser,
> >
> > sure, feel free.
> >
> > Cheers,
> > Thomas
> >
> > -----Original Message-----
> > From: Fraser Moore [mailto:community-noreply@qnx.com]
> > Sent: Freitag, 10. August 2012 10:37
> > To: ostech-core_os@community.qnx.com
> > Subject: Re: TimerTimeout() not getting timeout
> >
> > Hi Thomas, I think that's exactly what's happening. I had just been reading
> the about this in the documentation. I will try and create a new thread to
> handle this.
> >
> > I may be back for more advice.
> >
> > Thanks,
> > Fraser
> >
> > On 10/08/2012 09:25, Thomas Haupt wrote:
> >> The io_unblock callout will only be invoked when you get back to your
> resource manager's main loop (dispatch_block() / dispatch_handle())
> somehow.
> >>
> >> If you are handling the devctl in some way such that the resource
> manager will still be in io_devctl() when the timeout comes, no unblock
> handling will be done.
> >>
> >> In order for unblocking to work properly, you need to somehow put
> "long" (potentially blocking) tasks into the "background" and return to the
> main message handler loop. That could mean doing them in a separate
> thread, or adding entries on an "outstanding tasks" list that you can look into
> when you see a state change (e.g., an interrupt signaling data coming in).
> >>
> >> Regards,
> >> Thomas
> >>
> >> -----Original Message-----
> >> From: Fraser Moore [mailto:community-noreply@qnx.com]
> >> Sent: Freitag, 10. August 2012 09:44
> >> To: ostech-core_os@community.qnx.com
> >> Subject: Re: TimerTimeout() not getting timeout
> >>
> >> I tried defining my own io_unblock that simply calls
> iofunc_unblock_default(). However I never see this function getting called
> by the resource manager. I am new to writing resource managers so what
> should I be doing to handle unblocks?
> >>
> >> cheers,
> >> fraser
> >>
> >> On 09/08/2012 14:52, Lichun Zhu wrote:
> >>> I think this is it, the resmgr did not handle unblock.
> >>>
> >>> -----Original Message-----
> >>> From: Thomas Haupt [mailto:community-noreply@qnx.com]
> >>> Sent: Thursday, August 09, 2012 9:44 AM
> >>> To: 'ostech-core_os@community.qnx.com'
> >>> Subject: RE: TimerTimeout() not getting timeout
> >>>
> >>> Does it do proper unblock handling?
> >>>
> >>> -----Original Message-----
> >>> From: Fraser Moore [mailto:community-noreply@qnx.com]
> >>> Sent: Donnerstag, 9. August 2012 15:40
> >>> To: ostech-core_os@community.qnx.com
> >>> Subject: Re: TimerTimeout() not getting timeout
> >>>
> >>> It is one that we have developed.
> >>>
> >>> On 09/08/2012 14:28, Thomas Haupt wrote:
> >>>> What resource manager is this devctl going to?
> >>>>
> >>>> - Thomas
> >>>>
> >>>> -----Original Message-----
> >>>> From: Fraser Moore [mailto:community-noreply@qnx.com]
> >>>> Sent: Donnerstag, 9. August 2012 15:27
> >>>> To: ostech-core_os@community.qnx.com
> >>>> Subject: Re: TimerTimeout() not getting timeout
> >>>>
> >>>> Thanks for the reply. I had tried this but got the same results.
> >>>>
> >>>> On 09/08/2012 12:05, Gervais Mulongoy wrote:
> >>>>> Try setting an unblock event instead of NULL:
> >>>>>
> >>>>> SIGEV_UNBLOCK_INIT(&ev);
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> _______________________________________________
> >>>>>
> >>>>> OSTech
> >>>>> http://community.qnx.com/sf/go/post94710
> >>>>> To cancel your subscription to this discussion, please e-mail
> >>>>> ostech-core_os-unsubscribe@community.qnx.com
> >>>>>
> >>>>
> >>>> --
> >>>> Fraser Moore
> >>>> Abelon Systems Ltd
> >>>> Building 4, Quantum Court, Research Avenue South, Heriot Watt
> Research Park, Riccarton, Edinburgh EH14 4AP.
> >>>> phone: 0131 449 9173 web: www.abelon.com
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>>
> >>>> OSTech
> >>>> http://community.qnx.com/sf/go/post94714
> >>>> To cancel your subscription to this discussion, please e-mail
> >>>> ostech-core_os-unsubscribe@community.qnx.com
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>>
> >>>> OSTech
> >>>> http://community.qnx.com/sf/go/post94715
> >>>> To cancel your subscription to this discussion, please e-mail
> >>>> ostech-core_os-unsubscribe@community.qnx.com
> >>>>
> >>>
> >>> --
> >>> Fraser Moore
> >>> Abelon Systems Ltd
> >>> Building 4, Quantum Court, Research Avenue South, Heriot Watt
> Research Park, Riccarton, Edinburgh EH14 4AP.
> >>> phone: 0131 449 9173 web: www.abelon.com
> >>>
> >>>
> >>>
> >>>
> >>> _______________________________________________
> >>>
> >>> OSTech
> >>> http://community.qnx.com/sf/go/post94716
> >>> To cancel your subscription to this discussion, please e-mail
> >>> ostech-core_os-unsubscribe@community.qnx.com
> >>>
> >>>
> >>>
> >>>
> >>> _______________________________________________
> >>>
> >>> OSTech
> >>> http://community.qnx.com/sf/go/post94717
> >>> To cancel your subscription to this discussion, please e-mail
> >>> ostech-core_os-unsubscribe@community.qnx.com
> >>>
> >>>
> >>>
> >>>
> >>> _______________________________________________
> >>>
> >>> OSTech
> >>> http://community.qnx.com/sf/go/post94718
> >>> To cancel your subscription to this discussion, please e-mail
> >>> ostech-core_os-unsubscribe@community.qnx.com
> >>>
> >>
> >> --
> >> Fraser Moore
> >> Abelon Systems Ltd
> >> Building 4, Quantum Court, Research Avenue South, Heriot Watt Research
> Park, Riccarton, Edinburgh EH14 4AP.
> >> phone: 0131 449 9173 web: www.abelon.com
> >>
> >>
> >>
> >>
> >> _______________________________________________
> >>
> >> OSTech
> >> http://community.qnx.com/sf/go/post94741
> >> To cancel your subscription to this discussion, please e-mail
> >> ostech-core_os-unsubscribe@community.qnx.com
> >>
> >>
> >>
> >>
> >> _______________________________________________
> >>
> >> OSTech
> >> http://community.qnx.com/sf/go/post94743
> >> To cancel your subscription to this discussion, please e-mail
> >> ostech-core_os-unsubscribe@community.qnx.com
> >>
> >
> > --
> > Fraser Moore
> > Abelon Systems Ltd
> > Building 4, Quantum Court, Research Avenue South, Heriot Watt Research
> Park, Riccarton, Edinburgh EH14 4AP.
> > phone: 0131 449 9173 web: www.abelon.com
> >
> >
> >
> >
> > _______________________________________________
> >
> > OSTech
> > http://community.qnx.com/sf/go/post94744
> > To cancel your subscription to this discussion, please e-mail
> > ostech-core_os-unsubscribe@community.qnx.com
> >
> >
> >
> >
> > _______________________________________________
> >
> > OSTech
> > http://community.qnx.com/sf/go/post94745
> > To cancel your subscription to this discussion, please e-mail
> > ostech-core_os-unsubscribe@community.qnx.com
> >
>
> --
> Fraser Moore
> Abelon Systems Ltd
> Building 4, Quantum Court, Research Avenue South, Heriot Watt Research
> Park, Riccarton, Edinburgh EH14 4AP.
> phone: 0131 449 9173 web: www.abelon.com
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post94751
> To cancel your subscription to this discussion, please e-mail ostech-core_os-
> unsubscribe@community.qnx.com
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post94752
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comThomas Haupt2012-08-10T14:47:24Zpost94751: Re: TimerTimeout() not getting timeoutFraser Moorehttp://community.qnx.com/sf/go/post947512012-08-10T14:43:38Z2012-08-10T14:43:38ZI can now get io_unblock to be called from a separate thread but how do
I then reply to the client which is blocked on another thread to unblock it?
cheers,
fraser
On 10/08/2012 10:43, Thomas Haupt wrote:
> Hi Fraser,
>
> sure, feel free.
>
> Cheers,
> Thomas
>
> -----Original Message-----
> From: Fraser Moore [mailto:community-noreply@qnx.com]
> Sent: Freitag, 10. August 2012 10:37
> To: ostech-core_os@community.qnx.com
> Subject: Re: TimerTimeout() not getting timeout
>
> Hi Thomas, I think that's exactly what's happening. I had just been reading the about this in the documentation. I will try and create a new thread to handle this.
>
> I may be back for more advice.
>
> Thanks,
> Fraser
>
> On 10/08/2012 09:25, Thomas Haupt wrote:
>> The io_unblock callout will only be invoked when you get back to your resource manager's main loop (dispatch_block() / dispatch_handle()) somehow.
>>
>> If you are handling the devctl in some way such that the resource manager will still be in io_devctl() when the timeout comes, no unblock handling will be done.
>>
>> In order for unblocking to work properly, you need to somehow put "long" (potentially blocking) tasks into the "background" and return to the main message handler loop. That could mean doing them in a separate thread, or adding entries on an "outstanding tasks" list that you can look into when you see a state change (e.g., an interrupt signaling data coming in).
>>
>> Regards,
>> Thomas
>>
>> -----Original Message-----
>> From: Fraser Moore [mailto:community-noreply@qnx.com]
>> Sent: Freitag, 10. August 2012 09:44
>> To: ostech-core_os@community.qnx.com
>> Subject: Re: TimerTimeout() not getting timeout
>>
>> I tried defining my own io_unblock that simply calls iofunc_unblock_default(). However I never see this function getting called by the resource manager. I am new to writing resource managers so what should I be doing to handle unblocks?
>>
>> cheers,
>> fraser
>>
>> On 09/08/2012 14:52, Lichun Zhu wrote:
>>> I think this is it, the resmgr did not handle unblock.
>>>
>>> -----Original Message-----
>>> From: Thomas Haupt [mailto:community-noreply@qnx.com]
>>> Sent: Thursday, August 09, 2012 9:44 AM
>>> To: 'ostech-core_os@community.qnx.com'
>>> Subject: RE: TimerTimeout() not getting timeout
>>>
>>> Does it do proper unblock handling?
>>>
>>> -----Original Message-----
>>> From: Fraser Moore [mailto:community-noreply@qnx.com]
>>> Sent: Donnerstag, 9. August 2012 15:40
>>> To: ostech-core_os@community.qnx.com
>>> Subject: Re: TimerTimeout() not getting timeout
>>>
>>> It is one that we have developed.
>>>
>>> On 09/08/2012 14:28, Thomas Haupt wrote:
>>>> What resource manager is this devctl going to?
>>>>
>>>> - Thomas
>>>>
>>>> -----Original Message-----
>>>> From: Fraser Moore [mailto:community-noreply@qnx.com]
>>>> Sent: Donnerstag, 9. August 2012 15:27
>>>> To: ostech-core_os@community.qnx.com
>>>> Subject: Re: TimerTimeout() not getting timeout
>>>>
>>>> Thanks for the reply. I had tried this but got the same results.
>>>>
>>>> On 09/08/2012 12:05, Gervais Mulongoy wrote:
>>>>> Try setting an unblock event instead of NULL:
>>>>>
>>>>> SIGEV_UNBLOCK_INIT(&ev);
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>>
>>>>> OSTech
>>>>> http://community.qnx.com/sf/go/post94710
>>>>> To cancel your subscription to this discussion, please e-mail
>>>>> ostech-core_os-unsubscribe@community.qnx.com
>>>>>
>>>>
>>>> --
>>>> Fraser Moore
>>>> Abelon Systems Ltd
>>>> Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP.
>>>> phone: 0131 449 9173 web: www.abelon.com
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>>
>>>> OSTech
>>>> http://community.qnx.com/sf/go/post94714
>>>> To cancel your subscription to this discussion, please e-mail
>>>> ostech-core_os-unsubscribe@community.qnx.com
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>>
>>>> OSTech
>>>> http://community.qnx.com/sf/go/post94715
>>>> To cancel your subscription to this discussion, please e-mail
>>>> ostech-core_os-unsubscribe@community.qnx.com
>>>>
>>>
>>> --
>>> Fraser Moore
>>> Abelon Systems Ltd
>>> Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP.
>>> phone: 0131 449 9173 web: www.abelon.com
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>>
>>> OSTech
>>> http://community.qnx.com/sf/go/post94716
>>> To cancel your subscription to this discussion, please e-mail
>>> ostech-core_os-unsubscribe@community.qnx.com
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>>
>>> OSTech
>>> http://community.qnx.com/sf/go/post94717
>>> To cancel your subscription to this discussion, please e-mail
>>> ostech-core_os-unsubscribe@community.qnx.com
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>>
>>> OSTech
>>> http://community.qnx.com/sf/go/post94718
>>> To cancel your subscription to this discussion, please e-mail
>>> ostech-core_os-unsubscribe@community.qnx.com
>>>
>>
>> --
>> Fraser Moore
>> Abelon Systems Ltd
>> Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP.
>> phone: 0131 449 9173 web: www.abelon.com
>>
>>
>>
>>
>> _______________________________________________
>>
>> OSTech
>> http://community.qnx.com/sf/go/post94741
>> To cancel your subscription to this discussion, please e-mail
>> ostech-core_os-unsubscribe@community.qnx.com
>>
>>
>>
>>
>> _______________________________________________
>>
>> OSTech
>> http://community.qnx.com/sf/go/post94743
>> To cancel your subscription to this discussion, please e-mail
>> ostech-core_os-unsubscribe@community.qnx.com
>>
>
> --
> Fraser Moore
> Abelon Systems Ltd
> Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP.
> phone: 0131 449 9173 web: www.abelon.com
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post94744
> To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post94745
> To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com
>
--
Fraser Moore
Abelon Systems Ltd
Building 4, Quantum Court, Research Avenue South,
Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP.
phone: 0131 449 9173 web: www.abelon.comFraser Moore2012-08-10T14:43:38Zpost94752: RE: TimerTimeout() not getting timeoutDavid Sarrazinhttp://community.qnx.com/sf/go/post947522012-08-10T14:41:59Z2012-08-10T14:41:59ZSimplest way to is to MsgError(ctp->rcvid), which will unblock the client. It's then very important for your resource manager to keep track of the fact that it has already replied, and either abort the current operation, or simply skip over the MsgReply that happens when the devctl thread finishes.
> -----Original Message-----
> From: Fraser Moore [mailto:community-noreply@qnx.com]
> Sent: August-10-12 10:39 AM
> To: ostech-core_os@community.qnx.com
> Subject: Re: TimerTimeout() not getting timeout
>
> I can now get io_unblock to be called from a separate thread but how do I
> then reply to the client which is blocked on another thread to unblock it?
>
> cheers,
> fraser
>
> On 10/08/2012 10:43, Thomas Haupt wrote:
> > Hi Fraser,
> >
> > sure, feel free.
> >
> > Cheers,
> > Thomas
> >
> > -----Original Message-----
> > From: Fraser Moore [mailto:community-noreply@qnx.com]
> > Sent: Freitag, 10. August 2012 10:37
> > To: ostech-core_os@community.qnx.com
> > Subject: Re: TimerTimeout() not getting timeout
> >
> > Hi Thomas, I think that's exactly what's happening. I had just been reading
> the about this in the documentation. I will try and create a new thread to
> handle this.
> >
> > I may be back for more advice.
> >
> > Thanks,
> > Fraser
> >
> > On 10/08/2012 09:25, Thomas Haupt wrote:
> >> The io_unblock callout will only be invoked when you get back to your
> resource manager's main loop (dispatch_block() / dispatch_handle())
> somehow.
> >>
> >> If you are handling the devctl in some way such that the resource
> manager will still be in io_devctl() when the timeout comes, no unblock
> handling will be done.
> >>
> >> In order for unblocking to work properly, you need to somehow put
> "long" (potentially blocking) tasks into the "background" and return to the
> main message handler loop. That could mean doing them in a separate
> thread, or adding entries on an "outstanding tasks" list that you can look into
> when you see a state change (e.g., an interrupt signaling data coming in).
> >>
> >> Regards,
> >> Thomas
> >>
> >> -----Original Message-----
> >> From: Fraser Moore [mailto:community-noreply@qnx.com]
> >> Sent: Freitag, 10. August 2012 09:44
> >> To: ostech-core_os@community.qnx.com
> >> Subject: Re: TimerTimeout() not getting timeout
> >>
> >> I tried defining my own io_unblock that simply calls
> iofunc_unblock_default(). However I never see this function getting called
> by the resource manager. I am new to writing resource managers so what
> should I be doing to handle unblocks?
> >>
> >> cheers,
> >> fraser
> >>
> >> On 09/08/2012 14:52, Lichun Zhu wrote:
> >>> I think this is it, the resmgr did not handle unblock.
> >>>
> >>> -----Original Message-----
> >>> From: Thomas Haupt [mailto:community-noreply@qnx.com]
> >>> Sent: Thursday, August 09, 2012 9:44 AM
> >>> To: 'ostech-core_os@community.qnx.com'
> >>> Subject: RE: TimerTimeout() not getting timeout
> >>>
> >>> Does it do proper unblock handling?
> >>>
> >>> -----Original Message-----
> >>> From: Fraser Moore [mailto:community-noreply@qnx.com]
> >>> Sent: Donnerstag, 9. August 2012 15:40
> >>> To: ostech-core_os@community.qnx.com
> >>> Subject: Re: TimerTimeout() not getting timeout
> >>>
> >>> It is one that we have developed.
> >>>
> >>> On 09/08/2012 14:28, Thomas Haupt wrote:
> >>>> What resource manager is this devctl going to?
> >>>>
> >>>> - Thomas
> >>>>
> >>>> -----Original Message-----
> >>>> From: Fraser Moore [mailto:community-noreply@qnx.com]
> >>>> Sent: Donnerstag, 9. August 2012 15:27
> >>>> To: ostech-core_os@community.qnx.com
> >>>> Subject: Re: TimerTimeout() not getting timeout
> >>>>
> >>>> Thanks for the reply. I had tried this but got the same results.
> >>>>
> >>>> On 09/08/2012 12:05, Gervais Mulongoy wrote:
> >>>>> Try setting an unblock event instead of NULL:
> >>>>>
> >>>>> SIGEV_UNBLOCK_INIT(&ev);
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> _______________________________________________
> >>>>>
> >>>>> OSTech
> >>>>> http://community.qnx.com/sf/go/post94710
> >>>>> To cancel your subscription to this discussion, please e-mail
> >>>>> ostech-core_os-unsubscribe@community.qnx.com
> >>>>>
> >>>>
> >>>> --
> >>>> Fraser Moore
> >>>> Abelon Systems Ltd
> >>>> Building 4, Quantum Court, Research Avenue South, Heriot Watt
> Research Park, Riccarton, Edinburgh EH14 4AP.
> >>>> phone: 0131 449 9173 web: www.abelon.com
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>>
> >>>> OSTech
> >>>> http://community.qnx.com/sf/go/post94714
> >>>> To cancel your subscription to this discussion, please e-mail
> >>>> ostech-core_os-unsubscribe@community.qnx.com
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>>
> >>>> OSTech
> >>>> http://community.qnx.com/sf/go/post94715
> >>>> To cancel your subscription to this discussion, please e-mail
> >>>> ostech-core_os-unsubscribe@community.qnx.com
> >>>>
> >>>
> >>> --
> >>> Fraser Moore
> >>> Abelon Systems Ltd
> >>> Building 4, Quantum Court, Research Avenue South, Heriot Watt
> Research Park, Riccarton, Edinburgh EH14 4AP.
> >>> phone: 0131 449 9173 web: www.abelon.com
> >>>
> >>>
> >>>
> >>>
> >>> _______________________________________________
> >>>
> >>> OSTech
> >>> http://community.qnx.com/sf/go/post94716
> >>> To cancel your subscription to this discussion, please e-mail
> >>> ostech-core_os-unsubscribe@community.qnx.com
> >>>
> >>>
> >>>
> >>>
> >>> _______________________________________________
> >>>
> >>> OSTech
> >>> http://community.qnx.com/sf/go/post94717
> >>> To cancel your subscription to this discussion, please e-mail
> >>> ostech-core_os-unsubscribe@community.qnx.com
> >>>
> >>>
> >>>
> >>>
> >>> _______________________________________________
> >>>
> >>> OSTech
> >>> http://community.qnx.com/sf/go/post94718
> >>> To cancel your subscription to this discussion, please e-mail
> >>> ostech-core_os-unsubscribe@community.qnx.com
> >>>
> >>
> >> --
> >> Fraser Moore
> >> Abelon Systems Ltd
> >> Building 4, Quantum Court, Research Avenue South, Heriot Watt Research
> Park, Riccarton, Edinburgh EH14 4AP.
> >> phone: 0131 449 9173 web: www.abelon.com
> >>
> >>
> >>
> >>
> >> _______________________________________________
> >>
> >> OSTech
> >> http://community.qnx.com/sf/go/post94741
> >> To cancel your subscription to this discussion, please e-mail
> >> ostech-core_os-unsubscribe@community.qnx.com
> >>
> >>
> >>
> >>
> >> _______________________________________________
> >>
> >> OSTech
> >> http://community.qnx.com/sf/go/post94743
> >> To cancel your subscription to this discussion, please e-mail
> >> ostech-core_os-unsubscribe@community.qnx.com
> >>
> >
> > --
> > Fraser Moore
> > Abelon Systems Ltd
> > Building 4, Quantum Court, Research Avenue South, Heriot Watt Research
> Park, Riccarton, Edinburgh EH14 4AP.
> > phone: 0131 449 9173 web: www.abelon.com
> >
> >
> >
> >
> > _______________________________________________
> >
> > OSTech
> > http://community.qnx.com/sf/go/post94744
> > To cancel your subscription to this discussion, please e-mail
> > ostech-core_os-unsubscribe@community.qnx.com
> >
> >
> >
> >
> > _______________________________________________
> >
> > OSTech
> > http://community.qnx.com/sf/go/post94745
> > To cancel your subscription to this discussion, please e-mail
> > ostech-core_os-unsubscribe@community.qnx.com
> >
>
> --
> Fraser Moore
> Abelon Systems Ltd
> Building 4, Quantum Court, Research Avenue South, Heriot Watt Research
> Park, Riccarton, Edinburgh EH14 4AP.
> phone: 0131 449 9173 web: www.abelon.com
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post94751
> To cancel your subscription to this discussion, please e-mail ostech-core_os-
> unsubscribe@community.qnx.comDavid Sarrazin2012-08-10T14:41:59Zpost94748: Re: TimerTimeout() not getting timeoutArmin Steinhoffhttp://community.qnx.com/sf/go/post947482012-08-10T11:29:10Z2012-08-10T11:29:10ZHi,
if you are using QNX6.5 in APIC mode, the interrupt of timer 0 will be
routed to IRQ2 and IRQ0 isn't available.
Checkout if there is a timer 0 interrupt at IRQ2 ...
--Armin
Fraser Moore wrote:
> Hi Thomas, I think that's exactly what's happening. I had just been
> reading the about this in the documentation. I will try and create a
> new thread to handle this.
>
> I may be back for more advice.
>
> Thanks,
> Fraser
>
> On 10/08/2012 09:25, Thomas Haupt wrote:
>> The io_unblock callout will only be invoked when you get back to your resource manager's main loop (dispatch_block() / dispatch_handle()) somehow.
>>
>> If you are handling the devctl in some way such that the resource manager will still be in io_devctl() when the timeout comes, no unblock handling will be done.
>>
>> In order for unblocking to work properly, you need to somehow put "long" (potentially blocking) tasks into the "background" and return to the main message handler loop. That could mean doing them in a separate thread, or adding entries on an "outstanding tasks" list that you can look into when you see a state change (e.g., an interrupt signaling data coming in).
>>
>> Regards,
>> Thomas
>>
>> -----Original Message-----
>> From: Fraser Moore [mailto:community-noreply@qnx.com]
>> Sent: Freitag, 10. August 2012 09:44
>> To: ostech-core_os@community.qnx.com
>> Subject: Re: TimerTimeout() not getting timeout
>>
>> I tried defining my own io_unblock that simply calls iofunc_unblock_default(). However I never see this function getting called by the resource manager. I am new to writing resource managers so what should I be doing to handle unblocks?
>>
>> cheers,
>> fraser
>>
>> On 09/08/2012 14:52, Lichun Zhu wrote:
>>> I think this is it, the resmgr did not handle unblock.
>>>
>>> -----Original Message-----
>>> From: Thomas Haupt [mailto:community-noreply@qnx.com]
>>> Sent: Thursday, August 09, 2012 9:44 AM
>>> To: 'ostech-core_os@community.qnx.com'
>>> Subject: RE: TimerTimeout() not getting timeout
>>>
>>> Does it do proper unblock handling?
>>>
>>> -----Original Message-----
>>> From: Fraser Moore [mailto:community-noreply@qnx.com]
>>> Sent: Donnerstag, 9. August 2012 15:40
>>> To: ostech-core_os@community.qnx.com
>>> Subject: Re: TimerTimeout() not getting timeout
>>>
>>> It is one that we have developed.
>>>
>>> On 09/08/2012 14:28, Thomas Haupt wrote:
>>>> What resource manager is this devctl going to?
>>>>
>>>> - Thomas
>>>>
>>>> -----Original Message-----
>>>> From: Fraser Moore [mailto:community-noreply@qnx.com]
>>>> Sent: Donnerstag, 9. August 2012 15:27
>>>> To: ostech-core_os@community.qnx.com
>>>> Subject: Re: TimerTimeout() not getting timeout
>>>>
>>>> Thanks for the reply. I had tried this but got the same results.
>>>>
>>>> On 09/08/2012 12:05, Gervais Mulongoy wrote:
>>>>> Try setting an unblock event instead of NULL:
>>>>>
>>>>> SIGEV_UNBLOCK_INIT(&ev);
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>>
>>>>> OSTech
>>>>> http://community.qnx.com/sf/go/post94710
>>>>> To cancel your subscription to this discussion, please e-mail
>>>>> ostech-core_os-unsubscribe@community.qnx.com
>>>>>
>>>> --
>>>> Fraser Moore
>>>> Abelon Systems Ltd
>>>> Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP.
>>>> phone: 0131 449 9173 web: www.abelon.com
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>>
>>>> OSTech
>>>> http://community.qnx.com/sf/go/post94714
>>>> To cancel your subscription to this discussion, please e-mail
>>>> ostech-core_os-unsubscribe@community.qnx.com
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>>
>>>> OSTech
>>>> http://community.qnx.com/sf/go/post94715
>>>> To cancel your subscription to this discussion, please e-mail
>>>> ostech-core_os-unsubscribe@community.qnx.com
>>>>
>>> --
>>> Fraser Moore
>>> Abelon Systems Ltd
>>> Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP.
>>> phone: 0131 449 9173 web: www.abelon.com
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>>
>>> OSTech
>>> http://community.qnx.com/sf/go/post94716
>>> To cancel your subscription to this discussion, please e-mail
>>> ostech-core_os-unsubscribe@community.qnx.com
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>>
>>> OSTech
>>> http://community.qnx.com/sf/go/post94717
>>> To cancel your subscription to this discussion, please e-mail
>>> ostech-core_os-unsubscribe@community.qnx.com
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>>
>>> OSTech
>>> http://community.qnx.com/sf/go/post94718
>>> To cancel your subscription to this discussion, please e-mail
>>> ostech-core_os-unsubscribe@community.qnx.com
>>>
>> --
>> Fraser Moore
>> Abelon Systems Ltd
>> Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP.
>> phone: 0131 449 9173 web: www.abelon.com
>>
>>
>>
>>
>> _______________________________________________
>>
>> OSTech
>> http://community.qnx.com/sf/go/post94741
>> To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com
>>
>>
>>
>>
>> _______________________________________________
>>
>> OSTech
>> http://community.qnx.com/sf/go/post94743
>> To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com
>>Armin Steinhoff2012-08-10T11:29:10Zpost94745: RE: TimerTimeout() not getting timeoutThomas Haupthttp://community.qnx.com/sf/go/post947452012-08-10T09:43:53Z2012-08-10T09:43:53ZHi Fraser,
sure, feel free.
Cheers,
Thomas
-----Original Message-----
From: Fraser Moore [mailto:community-noreply@qnx.com]
Sent: Freitag, 10. August 2012 10:37
To: ostech-core_os@community.qnx.com
Subject: Re: TimerTimeout() not getting timeout
Hi Thomas, I think that's exactly what's happening. I had just been reading the about this in the documentation. I will try and create a new thread to handle this.
I may be back for more advice.
Thanks,
Fraser
On 10/08/2012 09:25, Thomas Haupt wrote:
> The io_unblock callout will only be invoked when you get back to your resource manager's main loop (dispatch_block() / dispatch_handle()) somehow.
>
> If you are handling the devctl in some way such that the resource manager will still be in io_devctl() when the timeout comes, no unblock handling will be done.
>
> In order for unblocking to work properly, you need to somehow put "long" (potentially blocking) tasks into the "background" and return to the main message handler loop. That could mean doing them in a separate thread, or adding entries on an "outstanding tasks" list that you can look into when you see a state change (e.g., an interrupt signaling data coming in).
>
> Regards,
> Thomas
>
> -----Original Message-----
> From: Fraser Moore [mailto:community-noreply@qnx.com]
> Sent: Freitag, 10. August 2012 09:44
> To: ostech-core_os@community.qnx.com
> Subject: Re: TimerTimeout() not getting timeout
>
> I tried defining my own io_unblock that simply calls iofunc_unblock_default(). However I never see this function getting called by the resource manager. I am new to writing resource managers so what should I be doing to handle unblocks?
>
> cheers,
> fraser
>
> On 09/08/2012 14:52, Lichun Zhu wrote:
>> I think this is it, the resmgr did not handle unblock.
>>
>> -----Original Message-----
>> From: Thomas Haupt [mailto:community-noreply@qnx.com]
>> Sent: Thursday, August 09, 2012 9:44 AM
>> To: 'ostech-core_os@community.qnx.com'
>> Subject: RE: TimerTimeout() not getting timeout
>>
>> Does it do proper unblock handling?
>>
>> -----Original Message-----
>> From: Fraser Moore [mailto:community-noreply@qnx.com]
>> Sent: Donnerstag, 9. August 2012 15:40
>> To: ostech-core_os@community.qnx.com
>> Subject: Re: TimerTimeout() not getting timeout
>>
>> It is one that we have developed.
>>
>> On 09/08/2012 14:28, Thomas Haupt wrote:
>>> What resource manager is this devctl going to?
>>>
>>> - Thomas
>>>
>>> -----Original Message-----
>>> From: Fraser Moore [mailto:community-noreply@qnx.com]
>>> Sent: Donnerstag, 9. August 2012 15:27
>>> To: ostech-core_os@community.qnx.com
>>> Subject: Re: TimerTimeout() not getting timeout
>>>
>>> Thanks for the reply. I had tried this but got the same results.
>>>
>>> On 09/08/2012 12:05, Gervais Mulongoy wrote:
>>>> Try setting an unblock event instead of NULL:
>>>>
>>>> SIGEV_UNBLOCK_INIT(&ev);
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>>
>>>> OSTech
>>>> http://community.qnx.com/sf/go/post94710
>>>> To cancel your subscription to this discussion, please e-mail
>>>> ostech-core_os-unsubscribe@community.qnx.com
>>>>
>>>
>>> --
>>> Fraser Moore
>>> Abelon Systems Ltd
>>> Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP.
>>> phone: 0131 449 9173 web: www.abelon.com
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>>
>>> OSTech
>>> http://community.qnx.com/sf/go/post94714
>>> To cancel your subscription to this discussion, please e-mail
>>> ostech-core_os-unsubscribe@community.qnx.com
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>>
>>> OSTech
>>> http://community.qnx.com/sf/go/post94715
>>> To cancel your subscription to this discussion, please e-mail
>>> ostech-core_os-unsubscribe@community.qnx.com
>>>
>>
>> --
>> Fraser Moore
>> Abelon Systems Ltd
>> Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP.
>> phone: 0131 449 9173 web: www.abelon.com
>>
>>
>>
>>
>> _______________________________________________
>>
>> OSTech
>> http://community.qnx.com/sf/go/post94716
>> To cancel your subscription to this discussion, please e-mail
>> ostech-core_os-unsubscribe@community.qnx.com
>>
>>
>>
>>
>> _______________________________________________
>>
>> OSTech
>> http://community.qnx.com/sf/go/post94717
>> To cancel your subscription to this discussion, please e-mail
>> ostech-core_os-unsubscribe@community.qnx.com
>>
>>
>>
>>
>> _______________________________________________
>>
>> OSTech
>> http://community.qnx.com/sf/go/post94718
>> To cancel your subscription to this discussion, please e-mail
>> ostech-core_os-unsubscribe@community.qnx.com
>>
>
> --
> Fraser Moore
> Abelon Systems Ltd
> Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP.
> phone: 0131 449 9173 web: www.abelon.com
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post94741
> To cancel your subscription to this discussion, please e-mail
> ostech-core_os-unsubscribe@community.qnx.com
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post94743
> To cancel your subscription to this discussion, please e-mail
> ostech-core_os-unsubscribe@community.qnx.com
>
--
Fraser Moore
Abelon Systems Ltd
Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP.
phone: 0131 449 9173 web: www.abelon.com
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post94744
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comThomas Haupt2012-08-10T09:43:53Zpost94744: Re: TimerTimeout() not getting timeoutFraser Moorehttp://community.qnx.com/sf/go/post947442012-08-10T08:39:38Z2012-08-10T08:39:38ZHi Thomas, I think that's exactly what's happening. I had just been
reading the about this in the documentation. I will try and create a
new thread to handle this.
I may be back for more advice.
Thanks,
Fraser
On 10/08/2012 09:25, Thomas Haupt wrote:
> The io_unblock callout will only be invoked when you get back to your resource manager's main loop (dispatch_block() / dispatch_handle()) somehow.
>
> If you are handling the devctl in some way such that the resource manager will still be in io_devctl() when the timeout comes, no unblock handling will be done.
>
> In order for unblocking to work properly, you need to somehow put "long" (potentially blocking) tasks into the "background" and return to the main message handler loop. That could mean doing them in a separate thread, or adding entries on an "outstanding tasks" list that you can look into when you see a state change (e.g., an interrupt signaling data coming in).
>
> Regards,
> Thomas
>
> -----Original Message-----
> From: Fraser Moore [mailto:community-noreply@qnx.com]
> Sent: Freitag, 10. August 2012 09:44
> To: ostech-core_os@community.qnx.com
> Subject: Re: TimerTimeout() not getting timeout
>
> I tried defining my own io_unblock that simply calls iofunc_unblock_default(). However I never see this function getting called by the resource manager. I am new to writing resource managers so what should I be doing to handle unblocks?
>
> cheers,
> fraser
>
> On 09/08/2012 14:52, Lichun Zhu wrote:
>> I think this is it, the resmgr did not handle unblock.
>>
>> -----Original Message-----
>> From: Thomas Haupt [mailto:community-noreply@qnx.com]
>> Sent: Thursday, August 09, 2012 9:44 AM
>> To: 'ostech-core_os@community.qnx.com'
>> Subject: RE: TimerTimeout() not getting timeout
>>
>> Does it do proper unblock handling?
>>
>> -----Original Message-----
>> From: Fraser Moore [mailto:community-noreply@qnx.com]
>> Sent: Donnerstag, 9. August 2012 15:40
>> To: ostech-core_os@community.qnx.com
>> Subject: Re: TimerTimeout() not getting timeout
>>
>> It is one that we have developed.
>>
>> On 09/08/2012 14:28, Thomas Haupt wrote:
>>> What resource manager is this devctl going to?
>>>
>>> - Thomas
>>>
>>> -----Original Message-----
>>> From: Fraser Moore [mailto:community-noreply@qnx.com]
>>> Sent: Donnerstag, 9. August 2012 15:27
>>> To: ostech-core_os@community.qnx.com
>>> Subject: Re: TimerTimeout() not getting timeout
>>>
>>> Thanks for the reply. I had tried this but got the same results.
>>>
>>> On 09/08/2012 12:05, Gervais Mulongoy wrote:
>>>> Try setting an unblock event instead of NULL:
>>>>
>>>> SIGEV_UNBLOCK_INIT(&ev);
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>>
>>>> OSTech
>>>> http://community.qnx.com/sf/go/post94710
>>>> To cancel your subscription to this discussion, please e-mail
>>>> ostech-core_os-unsubscribe@community.qnx.com
>>>>
>>>
>>> --
>>> Fraser Moore
>>> Abelon Systems Ltd
>>> Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP.
>>> phone: 0131 449 9173 web: www.abelon.com
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>>
>>> OSTech
>>> http://community.qnx.com/sf/go/post94714
>>> To cancel your subscription to this discussion, please e-mail
>>> ostech-core_os-unsubscribe@community.qnx.com
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>>
>>> OSTech
>>> http://community.qnx.com/sf/go/post94715
>>> To cancel your subscription to this discussion, please e-mail
>>> ostech-core_os-unsubscribe@community.qnx.com
>>>
>>
>> --
>> Fraser Moore
>> Abelon Systems Ltd
>> Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP.
>> phone: 0131 449 9173 web: www.abelon.com
>>
>>
>>
>>
>> _______________________________________________
>>
>> OSTech
>> http://community.qnx.com/sf/go/post94716
>> To cancel your subscription to this discussion, please e-mail
>> ostech-core_os-unsubscribe@community.qnx.com
>>
>>
>>
>>
>> _______________________________________________
>>
>> OSTech
>> http://community.qnx.com/sf/go/post94717
>> To cancel your subscription to this discussion, please e-mail
>> ostech-core_os-unsubscribe@community.qnx.com
>>
>>
>>
>>
>> _______________________________________________
>>
>> OSTech
>> http://community.qnx.com/sf/go/post94718
>> To cancel your subscription to this discussion, please e-mail
>> ostech-core_os-unsubscribe@community.qnx.com
>>
>
> --
> Fraser Moore
> Abelon Systems Ltd
> Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP.
> phone: 0131 449 9173 web: www.abelon.com
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post94741
> To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post94743
> To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com
>
--
Fraser Moore
Abelon Systems Ltd
Building 4, Quantum Court, Research Avenue South,
Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP.
phone: 0131 449 9173 web: www.abelon.comFraser Moore2012-08-10T08:39:38Zpost94743: RE: TimerTimeout() not getting timeoutThomas Haupthttp://community.qnx.com/sf/go/post947432012-08-10T08:29:55Z2012-08-10T08:29:55ZThe io_unblock callout will only be invoked when you get back to your resource manager's main loop (dispatch_block() / dispatch_handle()) somehow.
If you are handling the devctl in some way such that the resource manager will still be in io_devctl() when the timeout comes, no unblock handling will be done.
In order for unblocking to work properly, you need to somehow put "long" (potentially blocking) tasks into the "background" and return to the main message handler loop. That could mean doing them in a separate thread, or adding entries on an "outstanding tasks" list that you can look into when you see a state change (e.g., an interrupt signaling data coming in).
Regards,
Thomas
-----Original Message-----
From: Fraser Moore [mailto:community-noreply@qnx.com]
Sent: Freitag, 10. August 2012 09:44
To: ostech-core_os@community.qnx.com
Subject: Re: TimerTimeout() not getting timeout
I tried defining my own io_unblock that simply calls iofunc_unblock_default(). However I never see this function getting called by the resource manager. I am new to writing resource managers so what should I be doing to handle unblocks?
cheers,
fraser
On 09/08/2012 14:52, Lichun Zhu wrote:
> I think this is it, the resmgr did not handle unblock.
>
> -----Original Message-----
> From: Thomas Haupt [mailto:community-noreply@qnx.com]
> Sent: Thursday, August 09, 2012 9:44 AM
> To: 'ostech-core_os@community.qnx.com'
> Subject: RE: TimerTimeout() not getting timeout
>
> Does it do proper unblock handling?
>
> -----Original Message-----
> From: Fraser Moore [mailto:community-noreply@qnx.com]
> Sent: Donnerstag, 9. August 2012 15:40
> To: ostech-core_os@community.qnx.com
> Subject: Re: TimerTimeout() not getting timeout
>
> It is one that we have developed.
>
> On 09/08/2012 14:28, Thomas Haupt wrote:
>> What resource manager is this devctl going to?
>>
>> - Thomas
>>
>> -----Original Message-----
>> From: Fraser Moore [mailto:community-noreply@qnx.com]
>> Sent: Donnerstag, 9. August 2012 15:27
>> To: ostech-core_os@community.qnx.com
>> Subject: Re: TimerTimeout() not getting timeout
>>
>> Thanks for the reply. I had tried this but got the same results.
>>
>> On 09/08/2012 12:05, Gervais Mulongoy wrote:
>>> Try setting an unblock event instead of NULL:
>>>
>>> SIGEV_UNBLOCK_INIT(&ev);
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>>
>>> OSTech
>>> http://community.qnx.com/sf/go/post94710
>>> To cancel your subscription to this discussion, please e-mail
>>> ostech-core_os-unsubscribe@community.qnx.com
>>>
>>
>> --
>> Fraser Moore
>> Abelon Systems Ltd
>> Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP.
>> phone: 0131 449 9173 web: www.abelon.com
>>
>>
>>
>>
>> _______________________________________________
>>
>> OSTech
>> http://community.qnx.com/sf/go/post94714
>> To cancel your subscription to this discussion, please e-mail
>> ostech-core_os-unsubscribe@community.qnx.com
>>
>>
>>
>>
>> _______________________________________________
>>
>> OSTech
>> http://community.qnx.com/sf/go/post94715
>> To cancel your subscription to this discussion, please e-mail
>> ostech-core_os-unsubscribe@community.qnx.com
>>
>
> --
> Fraser Moore
> Abelon Systems Ltd
> Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP.
> phone: 0131 449 9173 web: www.abelon.com
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post94716
> To cancel your subscription to this discussion, please e-mail
> ostech-core_os-unsubscribe@community.qnx.com
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post94717
> To cancel your subscription to this discussion, please e-mail
> ostech-core_os-unsubscribe@community.qnx.com
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post94718
> To cancel your subscription to this discussion, please e-mail
> ostech-core_os-unsubscribe@community.qnx.com
>
--
Fraser Moore
Abelon Systems Ltd
Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP.
phone: 0131 449 9173 web: www.abelon.com
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post94741
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comThomas Haupt2012-08-10T08:29:55Zpost94741: Re: TimerTimeout() not getting timeoutFraser Moorehttp://community.qnx.com/sf/go/post947412012-08-10T07:47:27Z2012-08-10T07:47:27ZI tried defining my own io_unblock that simply calls
iofunc_unblock_default(). However I never see this function getting
called by the resource manager. I am new to writing resource managers
so what should I be doing to handle unblocks?
cheers,
fraser
On 09/08/2012 14:52, Lichun Zhu wrote:
> I think this is it, the resmgr did not handle unblock.
>
> -----Original Message-----
> From: Thomas Haupt [mailto:community-noreply@qnx.com]
> Sent: Thursday, August 09, 2012 9:44 AM
> To: 'ostech-core_os@community.qnx.com'
> Subject: RE: TimerTimeout() not getting timeout
>
> Does it do proper unblock handling?
>
> -----Original Message-----
> From: Fraser Moore [mailto:community-noreply@qnx.com]
> Sent: Donnerstag, 9. August 2012 15:40
> To: ostech-core_os@community.qnx.com
> Subject: Re: TimerTimeout() not getting timeout
>
> It is one that we have developed.
>
> On 09/08/2012 14:28, Thomas Haupt wrote:
>> What resource manager is this devctl going to?
>>
>> - Thomas
>>
>> -----Original Message-----
>> From: Fraser Moore [mailto:community-noreply@qnx.com]
>> Sent: Donnerstag, 9. August 2012 15:27
>> To: ostech-core_os@community.qnx.com
>> Subject: Re: TimerTimeout() not getting timeout
>>
>> Thanks for the reply. I had tried this but got the same results.
>>
>> On 09/08/2012 12:05, Gervais Mulongoy wrote:
>>> Try setting an unblock event instead of NULL:
>>>
>>> SIGEV_UNBLOCK_INIT(&ev);
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>>
>>> OSTech
>>> http://community.qnx.com/sf/go/post94710
>>> To cancel your subscription to this discussion, please e-mail
>>> ostech-core_os-unsubscribe@community.qnx.com
>>>
>>
>> --
>> Fraser Moore
>> Abelon Systems Ltd
>> Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP.
>> phone: 0131 449 9173 web: www.abelon.com
>>
>>
>>
>>
>> _______________________________________________
>>
>> OSTech
>> http://community.qnx.com/sf/go/post94714
>> To cancel your subscription to this discussion, please e-mail
>> ostech-core_os-unsubscribe@community.qnx.com
>>
>>
>>
>>
>> _______________________________________________
>>
>> OSTech
>> http://community.qnx.com/sf/go/post94715
>> To cancel your subscription to this discussion, please e-mail
>> ostech-core_os-unsubscribe@community.qnx.com
>>
>
> --
> Fraser Moore
> Abelon Systems Ltd
> Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP.
> phone: 0131 449 9173 web: www.abelon.com
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post94716
> To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post94717
> To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post94718
> To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com
>
--
Fraser Moore
Abelon Systems Ltd
Building 4, Quantum Court, Research Avenue South,
Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP.
phone: 0131 449 9173 web: www.abelon.comFraser Moore2012-08-10T07:47:27Zpost94718: RE: TimerTimeout() not getting timeoutLichun Zhuhttp://community.qnx.com/sf/go/post947182012-08-09T13:55:50Z2012-08-09T13:55:50ZI think this is it, the resmgr did not handle unblock.
-----Original Message-----
From: Thomas Haupt [mailto:community-noreply@qnx.com]
Sent: Thursday, August 09, 2012 9:44 AM
To: 'ostech-core_os@community.qnx.com'
Subject: RE: TimerTimeout() not getting timeout
Does it do proper unblock handling?
-----Original Message-----
From: Fraser Moore [mailto:community-noreply@qnx.com]
Sent: Donnerstag, 9. August 2012 15:40
To: ostech-core_os@community.qnx.com
Subject: Re: TimerTimeout() not getting timeout
It is one that we have developed.
On 09/08/2012 14:28, Thomas Haupt wrote:
> What resource manager is this devctl going to?
>
> - Thomas
>
> -----Original Message-----
> From: Fraser Moore [mailto:community-noreply@qnx.com]
> Sent: Donnerstag, 9. August 2012 15:27
> To: ostech-core_os@community.qnx.com
> Subject: Re: TimerTimeout() not getting timeout
>
> Thanks for the reply. I had tried this but got the same results.
>
> On 09/08/2012 12:05, Gervais Mulongoy wrote:
>> Try setting an unblock event instead of NULL:
>>
>> SIGEV_UNBLOCK_INIT(&ev);
>>
>>
>>
>>
>> _______________________________________________
>>
>> OSTech
>> http://community.qnx.com/sf/go/post94710
>> To cancel your subscription to this discussion, please e-mail
>> ostech-core_os-unsubscribe@community.qnx.com
>>
>
> --
> Fraser Moore
> Abelon Systems Ltd
> Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP.
> phone: 0131 449 9173 web: www.abelon.com
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post94714
> To cancel your subscription to this discussion, please e-mail
> ostech-core_os-unsubscribe@community.qnx.com
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post94715
> To cancel your subscription to this discussion, please e-mail
> ostech-core_os-unsubscribe@community.qnx.com
>
--
Fraser Moore
Abelon Systems Ltd
Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP.
phone: 0131 449 9173 web: www.abelon.com
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post94716
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post94717
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comLichun Zhu2012-08-09T13:55:50Zpost94717: RE: TimerTimeout() not getting timeoutThomas Haupthttp://community.qnx.com/sf/go/post947172012-08-09T13:47:15Z2012-08-09T13:47:15ZDoes it do proper unblock handling?
-----Original Message-----
From: Fraser Moore [mailto:community-noreply@qnx.com]
Sent: Donnerstag, 9. August 2012 15:40
To: ostech-core_os@community.qnx.com
Subject: Re: TimerTimeout() not getting timeout
It is one that we have developed.
On 09/08/2012 14:28, Thomas Haupt wrote:
> What resource manager is this devctl going to?
>
> - Thomas
>
> -----Original Message-----
> From: Fraser Moore [mailto:community-noreply@qnx.com]
> Sent: Donnerstag, 9. August 2012 15:27
> To: ostech-core_os@community.qnx.com
> Subject: Re: TimerTimeout() not getting timeout
>
> Thanks for the reply. I had tried this but got the same results.
>
> On 09/08/2012 12:05, Gervais Mulongoy wrote:
>> Try setting an unblock event instead of NULL:
>>
>> SIGEV_UNBLOCK_INIT(&ev);
>>
>>
>>
>>
>> _______________________________________________
>>
>> OSTech
>> http://community.qnx.com/sf/go/post94710
>> To cancel your subscription to this discussion, please e-mail
>> ostech-core_os-unsubscribe@community.qnx.com
>>
>
> --
> Fraser Moore
> Abelon Systems Ltd
> Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP.
> phone: 0131 449 9173 web: www.abelon.com
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post94714
> To cancel your subscription to this discussion, please e-mail
> ostech-core_os-unsubscribe@community.qnx.com
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post94715
> To cancel your subscription to this discussion, please e-mail
> ostech-core_os-unsubscribe@community.qnx.com
>
--
Fraser Moore
Abelon Systems Ltd
Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP.
phone: 0131 449 9173 web: www.abelon.com
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post94716
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comThomas Haupt2012-08-09T13:47:15Zpost94716: Re: TimerTimeout() not getting timeoutFraser Moorehttp://community.qnx.com/sf/go/post947162012-08-09T13:42:17Z2012-08-09T13:42:17ZIt is one that we have developed.
On 09/08/2012 14:28, Thomas Haupt wrote:
> What resource manager is this devctl going to?
>
> - Thomas
>
> -----Original Message-----
> From: Fraser Moore [mailto:community-noreply@qnx.com]
> Sent: Donnerstag, 9. August 2012 15:27
> To: ostech-core_os@community.qnx.com
> Subject: Re: TimerTimeout() not getting timeout
>
> Thanks for the reply. I had tried this but got the same results.
>
> On 09/08/2012 12:05, Gervais Mulongoy wrote:
>> Try setting an unblock event instead of NULL:
>>
>> SIGEV_UNBLOCK_INIT(&ev);
>>
>>
>>
>>
>> _______________________________________________
>>
>> OSTech
>> http://community.qnx.com/sf/go/post94710
>> To cancel your subscription to this discussion, please e-mail
>> ostech-core_os-unsubscribe@community.qnx.com
>>
>
> --
> Fraser Moore
> Abelon Systems Ltd
> Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP.
> phone: 0131 449 9173 web: www.abelon.com
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post94714
> To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post94715
> To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com
>
--
Fraser Moore
Abelon Systems Ltd
Building 4, Quantum Court, Research Avenue South,
Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP.
phone: 0131 449 9173 web: www.abelon.comFraser Moore2012-08-09T13:42:17Zpost94714: Re: TimerTimeout() not getting timeoutFraser Moorehttp://community.qnx.com/sf/go/post947142012-08-09T13:30:16Z2012-08-09T13:30:16ZThanks for the reply. I had tried this but got the same results.
On 09/08/2012 12:05, Gervais Mulongoy wrote:
> Try setting an unblock event instead of NULL:
>
> SIGEV_UNBLOCK_INIT(&ev);
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post94710
> To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com
>
--
Fraser Moore
Abelon Systems Ltd
Building 4, Quantum Court, Research Avenue South,
Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP.
phone: 0131 449 9173 web: www.abelon.comFraser Moore2012-08-09T13:30:16Zpost94715: RE: TimerTimeout() not getting timeoutThomas Haupthttp://community.qnx.com/sf/go/post947152012-08-09T13:29:17Z2012-08-09T13:29:17ZWhat resource manager is this devctl going to?
- Thomas
-----Original Message-----
From: Fraser Moore [mailto:community-noreply@qnx.com]
Sent: Donnerstag, 9. August 2012 15:27
To: ostech-core_os@community.qnx.com
Subject: Re: TimerTimeout() not getting timeout
Thanks for the reply. I had tried this but got the same results.
On 09/08/2012 12:05, Gervais Mulongoy wrote:
> Try setting an unblock event instead of NULL:
>
> SIGEV_UNBLOCK_INIT(&ev);
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post94710
> To cancel your subscription to this discussion, please e-mail
> ostech-core_os-unsubscribe@community.qnx.com
>
--
Fraser Moore
Abelon Systems Ltd
Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP.
phone: 0131 449 9173 web: www.abelon.com
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post94714
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comThomas Haupt2012-08-09T13:29:17Zpost94710: Re: TimerTimeout() not getting timeoutGervais Mulongoyhttp://community.qnx.com/sf/go/post947102012-08-09T11:07:22Z2012-08-09T11:07:22ZTry setting an unblock event instead of NULL:
SIGEV_UNBLOCK_INIT(&ev);Gervais Mulongoy2012-08-09T11:07:22Zpost94708: TimerTimeout() not getting timeoutFraser Moorehttp://community.qnx.com/sf/go/post947082012-08-09T08:27:10Z2012-08-09T08:27:10ZHi,
I'm trying to use TimerTimeout() to check for timeouts before calling
devctl(), i.e.
timeout = 1000000000;
ret = TimerTimeout( CLOCK_REALTIME,
_NTO_TIMEOUT_SEND |
_NTO_TIMEOUT_REPLY,
NULL, &timeout, NULL);
ret = devctl( fd, dcmd, ipcMsg,
IPC_MESSAGE_SIZE( ipcMsg->dataLength ), NULL);
If I set timeout to 0 then I always get a timeout with devctl()
returning ETIMEDOUT as expected. But if I set it to any other non-zero
value then I never get the timeout event.
I'm building for the x86 platform and running it on a VMWare VM. I'm
not sure if I'm doing something wrong, or there is an issue with the
timeouts on this platform.
Any help much appreciated.
Fraser
--
Fraser Moore
Abelon Systems Ltd
Building 4, Quantum Court, Research Avenue South,
Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP.
phone: 0131 449 9173 web: www.abelon.comFraser Moore2012-08-09T08:27:10Zpost94668: QNX 6.5 OCB Extension BugDante Tezzahttp://community.qnx.com/sf/go/post946682012-08-07T11:55:52Z2012-08-07T11:55:52ZHello,
I would like to know if anyone tried and was succesfull extending OCB's on the 6.5 version. I believe that there is a bug allocating the extended OCB memory. The code compiles and executes, however the RM is not accessible even thou it is listed under devices. On older versions of the OS the code works perfectly. If I comment the line where we overwrite the mount.funcs structure (mount.funcs=&mount_funcs; in the attached code) the RM works but it may crash sometime since the memory is not allocated corrected. I am attaching the following code that shows the problem if anyone is interested in trying to fix it. It is a simple server/client application where the cliente registers its name on the server extended OCB, and on every write() call the cliente sends the server prints the client name.
Anyone has any ideas how to work-around this bug?
Thanks,
Dante Tezza
ps: when running the client, the desired name should be passed as an argumentDante Tezza2012-08-07T11:55:52Zpost94571: posix_spawnp diffifculties with file actionsJim Criteshttp://community.qnx.com/sf/go/post945712012-08-01T18:13:27Z2012-08-01T18:13:27ZI'm currently using posix_spawnp() to create child processes. I'm using posix_spawnp() instead of soawn() because I need the ability to start the child process with a specified uid:gid that is not the same as the parent process. I also want to "redirect" or open a specific file to rep[lace stdin, stdout, & stderr in the child process.
Anybody out there an 'expert' on posix_spawn ? The code below doesn't seem to work for the file replacement.
The following is a snipit of code [left out error handling] that I'm am using that is not working for the file portion. The function is called simple_spawn(), parameters are the path/file of the process to spawn, and a pointer to a argv[] type of array.
simpleSpawn( char *file, char **argv )
{
int rtn;
pid_t childPid = -1;
char * replFileName = "/var/log/mylog.txt";
posix_spawnattr_t spawnAttrib;
posix_spawn_file_actions_t spawnFileActions;
// init & setup attrib object
posix_spawnattr_init( &spawnAttrib );
posix_spawnattr_setxflags( &spawnAttrib, POSIX_SPAWN_SETCRED );
posix_spawnattr_setcred( &spawnAttrib, 0, 0 );
// init & setup file actions object
posix_spawn_file_actions_init( &spawnFileActions );
// replace stdin
posix_spawn_file_actions_addopen( &spawnFileActions, 0, replFileName, O_RDWR | O_CREAT | O_APPEND, 0600 )
// replace stdout
posix_spawn_file_actions_addopen( &spawnFileActions, 1, replFileName, O_RDWR | O_CREAT | O_APPEND, 0600 )
// replace stderr
posix_spawn_file_actions_addopen( &spawnFileActions, 2, replFileName, O_RDWR | O_CREAT | O_APPEND, 0600 )
// spawn the child
posix_spawnp( &childPid, file, &spawnFileActions, &spawnAttrib, argv, NULL )
return childPid;
}Jim Crites2012-08-01T18:13:27Zpost94560: Re: devc-ser8250 driverDave Nickersonhttp://community.qnx.com/sf/go/post945602012-08-01T13:18:32Z2012-08-01T13:18:32ZThis was a problem with the pre-release versions of SP1 but was addressed before SP1 released. The issue was the installer did not rebuild and copy new ifs images into the /.boot directory. If you installed a pre-release version of SP1, I would suggest uninstall 6.5.0 and re-installing 6.5.0 and then SP1.
If you did use a released version of SP1 and still ended up with older IFS images in your /.boot directory, then we should be looking at how that happened and PR it.
You can also rebuild your ifs images and copy them into your /.boot directory.
- DaveDave Nickerson2012-08-01T13:18:32Zpost94550: Re: QNX6.5.0 SP1 problem with posix_memalign.bogdan celerhttp://community.qnx.com/sf/go/post945502012-08-01T06:59:47Z2012-08-01T06:59:47ZAdam thanks.
It works very well.
bogdanbogdan celer2012-08-01T06:59:47Zpost94549: IRQ boundXiongwei Huanghttp://community.qnx.com/sf/go/post945492012-08-01T02:09:57Z2012-08-01T02:09:57ZHi all
Can qnx support IRQ bound to a core in ARM cortex A9 2cores smp enviroment ?
thanksXiongwei Huang2012-08-01T02:09:57Zpost94520: Re: QNX6.5.0 SP1 problem with posix_memalign.Adam Malloryhttp://community.qnx.com/sf/go/post945202012-07-30T17:57:40Z2012-07-30T17:57:40ZThanks for the report, it's been addressed and if you have a priority
support plan you can request a hotfix using reference #179337.
In the meantime you can work around the issue by setting your bin sizes as
such:
MALLOC_BAND_CONFIG_STR="8:16,32,0:24,32,0:32,32,0:48,24,0:64,24,0:80,24,0:9
6,16,0:128,8,0"
And exporting that environment variable or setting the same parameters via
mallopt().
--
Adam Mallory (amallory@qnx.com)
On 12-07-14 5:59 AM, "bogdan celer" <community-noreply@qnx.com> wrote:
>In QNX6. 5.0SP1 appears mistake in posix_memalign.
>Test program
># cat Test.c
>#include <stdlib.h>
>int main(int argc, char **argv)
>{
> void *ptr = 0;
> posix_memalign(&ptr, 16, 16 - 2 * sizeof (void*));
> posix_memalign(&ptr, 32, 32 - 2 * sizeof (void*));
> posix_memalign(&ptr, 64, 64 - 2 * sizeof (void*));
> posix_memalign(&ptr, 128, 128 - 2 * sizeof (void*));
> return (0);
>}
># gcc -g -o Test Test.c
>
>After starting - ./Test the program is standing in the STATE = RUNNIG
>state.
>This state is caused by:
>posix_memalign(&ptr, 128, 128 - 2 * sizeof (void*));
># gdb Test
>GNU gdb 6.8 qnx-nto (rev. 506)
>Copyright (C) 2008 Free Software Foundation, Inc.
>License GPLv3+: GNU GPL version 3 or later
><http://gnu.org/licenses/gpl.html>
>This is free software: you are free to change and redistribute it.
>There is NO WARRANTY, to the extent permitted by law. Type "show copying"
>and "show warranty" for details.
>This GDB was configured as "i486-pc-nto-qnx6.5.0"...
>(gdb) start
>Temporary breakpoint 1 at 0x8048699: file Test.c, line 4.
>Starting program: /root/Test0
>[New pid 2007084 tid 1]
>
>Temporary breakpoint 1, main (argc=1, argv=0x8047a04) at Test.c:4
>4 void *ptr = 0;
>(gdb) n
>5 posix_memalign(&ptr, 16, 16 - 2 * sizeof (void*));
>(gdb)
>6 posix_memalign(&ptr, 32, 32 - 2 * sizeof (void*));
>(gdb)
>7 posix_memalign(&ptr, 64, 64 - 2 * sizeof (void*));
>(gdb)
>8 posix_memalign(&ptr, 128, 128 - 2 * sizeof (void*));
>(gdb) <= and the program is standing in this place in the RUNNIG
>state
> <= After the interrupt - Ctrl C
>Program received signal SIGINT, Interrupt.
>0xb032799f in _band_get_aligned () from
>/usr/qnx650/target/qnx6/x86/lib/libc.so.3
>(gdb) q
>The program is running. Exit anyway? (y or n) y
>#
>
>I think that the problem lies in the function _band_get_aligned from
>libc.
>
>
>
>
>
>
>_______________________________________________
>
>OSTech
>http://community.qnx.com/sf/go/post94257
>To cancel your subscription to this discussion, please e-mail
>ostech-core_os-unsubscribe@community.qnx.comAdam Mallory2012-07-30T17:57:40Zpost94257: QNX6.5.0 SP1 problem with posix_memalign.bogdan celerhttp://community.qnx.com/sf/go/post942572012-07-14T09:59:29Z2012-07-14T09:59:29ZIn QNX6. 5.0SP1 appears mistake in posix_memalign.
Test program
# cat Test.c
#include <stdlib.h>
int main(int argc, char **argv)
{
void *ptr = 0;
posix_memalign(&ptr, 16, 16 - 2 * sizeof (void*));
posix_memalign(&ptr, 32, 32 - 2 * sizeof (void*));
posix_memalign(&ptr, 64, 64 - 2 * sizeof (void*));
posix_memalign(&ptr, 128, 128 - 2 * sizeof (void*));
return (0);
}
# gcc -g -o Test Test.c
After starting - ./Test the program is standing in the STATE = RUNNIG state.
This state is caused by:
posix_memalign(&ptr, 128, 128 - 2 * sizeof (void*));
# gdb Test
GNU gdb 6.8 qnx-nto (rev. 506)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-pc-nto-qnx6.5.0"...
(gdb) start
Temporary breakpoint 1 at 0x8048699: file Test.c, line 4.
Starting program: /root/Test0
[New pid 2007084 tid 1]
Temporary breakpoint 1, main (argc=1, argv=0x8047a04) at Test.c:4
4 void *ptr = 0;
(gdb) n
5 posix_memalign(&ptr, 16, 16 - 2 * sizeof (void*));
(gdb)
6 posix_memalign(&ptr, 32, 32 - 2 * sizeof (void*));
(gdb)
7 posix_memalign(&ptr, 64, 64 - 2 * sizeof (void*));
(gdb)
8 posix_memalign(&ptr, 128, 128 - 2 * sizeof (void*));
(gdb) <= and the program is standing in this place in the RUNNIG state
<= After the interrupt - Ctrl C
Program received signal SIGINT, Interrupt.
0xb032799f in _band_get_aligned () from /usr/qnx650/target/qnx6/x86/lib/libc.so.3
(gdb) q
The program is running. Exit anyway? (y or n) y
#
I think that the problem lies in the function _band_get_aligned from libc.bogdan celer2012-07-14T09:59:29Zpost94222: Re: devc-ser8250 driverAndrew Sherkhttp://community.qnx.com/sf/go/post942222012-07-12T13:58:12Z2012-07-12T13:58:12ZThank you for this information. It would appear Neutrino is booting from the older 6.5.0 IFS (qnxbase*.ifs) as your libc is not from SP1. The time stamps on the /proc/boot files (July 2010) also confirm that this is not an updated image. This is why the new devc-ser8250 does not work; it requires the SP1 libc.so.
Cheers,
Andy
On 2012-07-12, at 3:43 AM, Pekka Tuusjärvi wrote:
> Heres the output use -i /proc/boot/libc.so :
>
> NAME=libc.so
> DESCRIPTION=C runtime library
> DATE=2010/07/09-12:54:28-EDT
> STATE=stable
> HOST=mainbuild
> USER=builder
> VERSION=6.5.0
> TAGID=89
>
> And here ls -l /proc/boot :
>
> total 6353
> -rwxr-xr-x 1 root root 22294 Jul 09 2010 cam-cdrom.so
> -rwxr-xr-x 1 root root 13738 Jul 09 2010 cam-disk.so
> -rwxr-xr-x 1 root root 162930 Jul 09 2010 devb-adpu320
> -rwxr-xr-x 1 root root 162115 Jul 09 2010 devb-aha8
> -rwxr-xr-x 1 root root 38975 Jul 09 2010 devb-ahci
> -rwxr-xr-x 1 root root 107156 Jul 09 2010 devb-eide
> -rwxr-xr-x 1 root root 40821 Jul 09 2010 devb-mvSata
> -rwxr-xr-x 1 root root 35648 Jul 09 2010 devb-umass
> -rwxr-xr-x 1 root root 86733 Jul 09 2010 devc-con
> -rwxr-xr-x 1 root root 107815 Jul 09 2010 devc-con-hid
> -rwxr-xr-x 1 root root 58750 Jul 09 2010 devh-ps2ser.so
> -rwxr-xr-x 1 root root 21128 Jul 09 2010 devh-usb.so
> -rwxr-xr-x 1 root root 39142 Jul 09 2010 devu-ehci.so
> -rwxr-xr-x 1 root root 30761 Jul 09 2010 devu-ohci.so
> -rwxr-xr-x 1 root root 30007 Jul 09 2010 devu-uhci.so
> -rwxr-xr-x 1 root root 76369 Jul 09 2010 diskboot
> -rwxr-xr-x 1 root root 21382 Jul 09 2010 fesh
> -rwxr-xr-x 1 root root 49356 Jul 09 2010 fs-cd.so
> -rwxr-xr-x 1 root root 78433 Jul 09 2010 fs-dos.so
> -rwxr-xr-x 1 root root 56333 Jul 09 2010 fs-ext2.so
> -rwxr-xr-x 1 root root 62610 Jul 09 2010 fs-mac.so
> -rwxr-xr-x 1 root root 36735 Jul 09 2010 fs-nt.so
> -rwxr-xr-x 1 root root 55343 Jul 09 2010 fs-qnx4.so
> -rwxr-xr-x 1 root root 72902 Jul 09 2010 fs-qnx6.so
> -rwxr-xr-x 1 root root 85618 Jul 09 2010 fs-udf.so
> -rwxr-xr-x 1 root root 169908 Jul 09 2010 io-blk.so
> -rwxr-xr-x 1 root root 33170 Jul 09 2010 io-hid
> -rwxr-xr-x 1 root root 94088 Jul 09 2010 io-usb
> lrwxr-xr-x 1 root root 9 Jul 09 2010 libc.so -> libc.so.3
> -rwxr-xr-x 1 root root 513152 Jul 09 2010 libc.so.3
> lrwxr-xr-x 1 root root 11 Jul 09 2010 libcam.so -> libcam.so.2
> -rwxr-xr-x 1 root root 73504 Jul 09 2010 libcam.so.2
> lrwxr-xr-x 1 root root 13 Jul 09 2010 libhiddi.so -> libhiddi.so.1
> -rwxr-xr-x 1 root root 27906 Jul 09 2010 libhiddi.so.1
> lrwxr-xr-x 1 root root 13 Jul 09 2010 libusbdi.so -> libusbdi.so.2
> -rwxr-xr-x 1 root root 47748 Jul 09 2010 libusbdi.so.2
> -rwxr-xr-x 1 root root 64148 Jul 09 2010 pci-bios
> -rwxr-xr-x 1 root root 593920 Jul 09 2010 procnto-smp-instr
> -rwxr-xr-x 1 root root 13001 Jul 09 2010 seedres
> -rwxr-xr-x 1 root root 14636 Jul 09 2010 slogger
> -rw-rw-rw- 1 root root 144 Jul 10 2010 startup-script
> -rwxr-xr-x 1 root root 36783 Jul 09 2010 umass-enum
> -rw-r--r-- 1 root root 4113 Oct 26 2004 umass-enum.cfg
> -rw-rw-rw- 1 root root 18 Jul 10 2010 unlink_list
>
>
>> Try use -i /proc/boot/libc.so
>> And also ls -l /proc/boot
>>
>>
>>
>> ----- Original Message -----
>> From: Pekka Tuusjärvi [mailto:community-noreply@qnx.com]
>> Sent: Thursday, July 05, 2012 01:58 AM
>> To: ostech-core_os <ostech-core_os@community.qnx.com>
>> Subject: Re: devc-ser8250 driver
>>
>> Here is the output of that command.
>>
>> 'libc.so.3' is not an executable file in PATH: '/sbin:/usr/sbin:/usr/photon/
>> bin:/bin:/usr/bin:/usr/lo
>> cal/bin:/opt/bin:/opt/sbin:/usr/photon/appbuilder:/opt/X11R6/bin:/usr/X11R6/
>> bin:/usr/photon/dll:/usr/
>> photon/lib:/opt/lib:/usr/local/lib:/opt/X11R6/lib:/usr/X11R6/lib'.
>>
>> What should I do next?
>>
>>
>>
>> _______________________________________________
>>
>> OSTech
>> http://community.qnx.com/sf/go/post94041
>> To cancel your subscription to this discussion, please e-mail ostech-core_os-
>> unsubscribe@community.qnx.com
>
>
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post94216
> To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comAndrew Sherk2012-07-12T13:58:12Zpost94216: Re: devc-ser8250 driverPekka Tuusjärvihttp://community.qnx.com/sf/go/post942162012-07-12T07:43:07Z2012-07-12T07:43:07ZHeres the output use -i /proc/boot/libc.so :
NAME=libc.so
DESCRIPTION=C runtime library
DATE=2010/07/09-12:54:28-EDT
STATE=stable
HOST=mainbuild
USER=builder
VERSION=6.5.0
TAGID=89
And here ls -l /proc/boot :
total 6353
-rwxr-xr-x 1 root root 22294 Jul 09 2010 cam-cdrom.so
-rwxr-xr-x 1 root root 13738 Jul 09 2010 cam-disk.so
-rwxr-xr-x 1 root root 162930 Jul 09 2010 devb-adpu320
-rwxr-xr-x 1 root root 162115 Jul 09 2010 devb-aha8
-rwxr-xr-x 1 root root 38975 Jul 09 2010 devb-ahci
-rwxr-xr-x 1 root root 107156 Jul 09 2010 devb-eide
-rwxr-xr-x 1 root root 40821 Jul 09 2010 devb-mvSata
-rwxr-xr-x 1 root root 35648 Jul 09 2010 devb-umass
-rwxr-xr-x 1 root root 86733 Jul 09 2010 devc-con
-rwxr-xr-x 1 root root 107815 Jul 09 2010 devc-con-hid
-rwxr-xr-x 1 root root 58750 Jul 09 2010 devh-ps2ser.so
-rwxr-xr-x 1 root root 21128 Jul 09 2010 devh-usb.so
-rwxr-xr-x 1 root root 39142 Jul 09 2010 devu-ehci.so
-rwxr-xr-x 1 root root 30761 Jul 09 2010 devu-ohci.so
-rwxr-xr-x 1 root root 30007 Jul 09 2010 devu-uhci.so
-rwxr-xr-x 1 root root 76369 Jul 09 2010 diskboot
-rwxr-xr-x 1 root root 21382 Jul 09 2010 fesh
-rwxr-xr-x 1 root root 49356 Jul 09 2010 fs-cd.so
-rwxr-xr-x 1 root root 78433 Jul 09 2010 fs-dos.so
-rwxr-xr-x 1 root root 56333 Jul 09 2010 fs-ext2.so
-rwxr-xr-x 1 root root 62610 Jul 09 2010 fs-mac.so
-rwxr-xr-x 1 root root 36735 Jul 09 2010 fs-nt.so
-rwxr-xr-x 1 root root 55343 Jul 09 2010 fs-qnx4.so
-rwxr-xr-x 1 root root 72902 Jul 09 2010 fs-qnx6.so
-rwxr-xr-x 1 root root 85618 Jul 09 2010 fs-udf.so
-rwxr-xr-x 1 root root 169908 Jul 09 2010 io-blk.so
-rwxr-xr-x 1 root root 33170 Jul 09 2010 io-hid
-rwxr-xr-x 1 root root 94088 Jul 09 2010 io-usb
lrwxr-xr-x 1 root root 9 Jul 09 2010 libc.so -> libc.so.3
-rwxr-xr-x 1 root root 513152 Jul 09 2010 libc.so.3
lrwxr-xr-x 1 root root 11 Jul 09 2010 libcam.so -> libcam.so.2
-rwxr-xr-x 1 root root 73504 Jul 09 2010 libcam.so.2
lrwxr-xr-x 1 root root 13 Jul 09 2010 libhiddi.so -> libhiddi.so.1
-rwxr-xr-x 1 root root 27906 Jul 09 2010 libhiddi.so.1
lrwxr-xr-x 1 root root 13 Jul 09 2010 libusbdi.so -> libusbdi.so.2
-rwxr-xr-x 1 root root 47748 Jul 09 2010 libusbdi.so.2
-rwxr-xr-x 1 root root 64148 Jul 09 2010 pci-bios
-rwxr-xr-x 1 root root 593920 Jul 09 2010 procnto-smp-instr
-rwxr-xr-x 1 root root 13001 Jul 09 2010 seedres
-rwxr-xr-x 1 root root 14636 Jul 09 2010 slogger
-rw-rw-rw- 1 root root 144 Jul 10 2010 startup-script
-rwxr-xr-x 1 root root 36783 Jul 09 2010 umass-enum
-rw-r--r-- 1 root root 4113 Oct 26 2004 umass-enum.cfg
-rw-rw-rw- 1 root root 18 Jul 10 2010 unlink_list
> Try use -i /proc/boot/libc.so
> And also ls -l /proc/boot
>
>
>
> ----- Original Message -----
> From: Pekka Tuusjärvi [mailto:community-noreply@qnx.com]
> Sent: Thursday, July 05, 2012 01:58 AM
> To: ostech-core_os <ostech-core_os@community.qnx.com>
> Subject: Re: devc-ser8250 driver
>
> Here is the output of that command.
>
> 'libc.so.3' is not an executable file in PATH: '/sbin:/usr/sbin:/usr/photon/
> bin:/bin:/usr/bin:/usr/lo
> cal/bin:/opt/bin:/opt/sbin:/usr/photon/appbuilder:/opt/X11R6/bin:/usr/X11R6/
> bin:/usr/photon/dll:/usr/
> photon/lib:/opt/lib:/usr/local/lib:/opt/X11R6/lib:/usr/X11R6/lib'.
>
> What should I do next?
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post94041
> To cancel your subscription to this discussion, please e-mail ostech-core_os-
> unsubscribe@community.qnx.comPekka Tuusjärvi2012-07-12T07:43:07Zpost94176: typed mem versus shared memMario Charesthttp://community.qnx.com/sf/go/post941762012-07-10T19:41:23Z2012-07-10T19:41:23ZIs there a recommended way to shared typed mem.
We need shared memory but above the 4G barrier.Mario Charest2012-07-10T19:41:23Zpost94055: Re: devc-ser8250 driverAndrew Sherkhttp://community.qnx.com/sf/go/post940552012-07-05T11:47:01Z2012-07-05T11:47:01ZTry use -i /proc/boot/libc.so
And also ls -l /proc/boot
----- Original Message -----
From: Pekka Tuusjärvi [mailto:community-noreply@qnx.com]
Sent: Thursday, July 05, 2012 01:58 AM
To: ostech-core_os <ostech-core_os@community.qnx.com>
Subject: Re: devc-ser8250 driver
Here is the output of that command.
'libc.so.3' is not an executable file in PATH: '/sbin:/usr/sbin:/usr/photon/bin:/bin:/usr/bin:/usr/lo
cal/bin:/opt/bin:/opt/sbin:/usr/photon/appbuilder:/opt/X11R6/bin:/usr/X11R6/bin:/usr/photon/dll:/usr/
photon/lib:/opt/lib:/usr/local/lib:/opt/X11R6/lib:/usr/X11R6/lib'.
What should I do next?
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post94041
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comAndrew Sherk2012-07-05T11:47:01Zpost94041: Re: devc-ser8250 driverPekka Tuusjärvihttp://community.qnx.com/sf/go/post940412012-07-05T05:58:51Z2012-07-05T05:58:51ZHere is the output of that command.
'libc.so.3' is not an executable file in PATH: '/sbin:/usr/sbin:/usr/photon/bin:/bin:/usr/bin:/usr/lo
cal/bin:/opt/bin:/opt/sbin:/usr/photon/appbuilder:/opt/X11R6/bin:/usr/X11R6/bin:/usr/photon/dll:/usr/
photon/lib:/opt/lib:/usr/local/lib:/opt/X11R6/lib:/usr/X11R6/lib'.
What should I do next?Pekka Tuusjärvi2012-07-05T05:58:51Zpost94023: Re: devc-ser8250 driverAndrew Sherkhttp://community.qnx.com/sf/go/post940232012-07-04T13:53:05Z2012-07-04T13:53:05Z> ldd:FATAL: Unresolved symbol "hwi_find_item" called from Executable
>
> If I copy the driver from the older ISO it works just fine.
I suspect that while you've updated binaries to SP1, you have booted from a pre-SP1 image (IFS) where the first libc in the search path (probably /proc/boot/libc.so.3) is not updated to SP1.
Can you check that you are using the SP1 libc.so.3 ? use -i libc.so.3 should tell you.Andrew Sherk2012-07-04T13:53:05Zpost94017: Re: devc-ser8250 driverAndrew Sherkhttp://community.qnx.com/sf/go/post940172012-07-04T12:53:26Z2012-07-04T12:53:26ZFrom the runtime, what is the output of uname -a ?
On 2012-07-04, at 5:54 AM, Pekka Tuusjärvi wrote:
> Hi, I installed SP1 update to 6.5.0 and then burned the runtime image. In the SP1 runtime that serial driver wont work. Here is the error message when I try to start the driver :
>
> ldd:FATAL: Unresolved symbol "hwi_find_item" called from Executable
>
> If I copy the driver from the older ISO it works just fine. Some kind of compile bug??
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post94005
> To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comAndrew Sherk2012-07-04T12:53:26Zpost94005: devc-ser8250 driverPekka Tuusjärvihttp://community.qnx.com/sf/go/post940052012-07-04T09:54:47Z2012-07-04T09:54:47ZHi, I installed SP1 update to 6.5.0 and then burned the runtime image. In the SP1 runtime that serial driver wont work. Here is the error message when I try to start the driver :
ldd:FATAL: Unresolved symbol "hwi_find_item" called from Executable
If I copy the driver from the older ISO it works just fine. Some kind of compile bug??Pekka Tuusjärvi2012-07-04T09:54:47Zpost94001: Re: select_attach read callback with no dataMark Dowdyhttp://community.qnx.com/sf/go/post940012012-07-04T00:52:09Z2012-07-04T00:52:09ZReplying to my own post, we seem to have found the issue and a solution. See http://community.qnx.com/sf/discussion/do/listPosts/projects.bsp/discussion.bsp.topc22070.
MarkMark Dowdy2012-07-04T00:52:09Zpost93943: Re: RE: select() not respecting the timeout parameter?Dragan Jurichttp://community.qnx.com/sf/go/post939432012-06-28T19:53:16Z2012-06-28T19:53:16ZThanks... that opens some more possibilities for fixing my problem :)Dragan Juric2012-06-28T19:53:16Zpost93940: RE: select() not respecting the timeout parameter?Brian Stecherhttp://community.qnx.com/sf/go/post939402012-06-28T19:27:03Z2012-06-28T19:27:03ZTimer harmonization:
http://foundry51.qnx.com/sf/discussion/do/listPosts/projects.internal_deckard/discussion.announcements.topc31937
-----Original Message-----
From: Dragan Juric [mailto:community-noreply@qnx.com]
Sent: June 28, 2012 3:20 PM
To: ostech-core_os
Subject: select() not respecting the timeout parameter?
Hello,
While working on EMA (the service that enrolls a device into BDS) I noticed that a select.select() call from python (which maps into regular C select() Unix/Posix API) does not respect the timeout.
I give it a timeout of 300 (5 min) but it timeouts semi-randomly, sometimes after 8 min, sometimes after 9 or 6 or 5 or 10... and the consequence of that was promptly reported back to me as a gating issue.
For the time being, I reworked it as a loop with timeout of 0 at select() and a call to time.sleep(), but, does anyone have any idea what's going on here?
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post93939
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comBrian Stecher2012-06-28T19:27:03Zpost93939: select() not respecting the timeout parameter?Dragan Jurichttp://community.qnx.com/sf/go/post939392012-06-28T19:20:01Z2012-06-28T19:20:01ZHello,
While working on EMA (the service that enrolls a device into BDS) I noticed that a select.select() call from python (which maps into regular C select() Unix/Posix API) does not respect the timeout.
I give it a timeout of 300 (5 min) but it timeouts semi-randomly, sometimes after 8 min, sometimes after 9 or 6 or 5 or 10... and the consequence of that was promptly reported back to me as a gating issue.
For the time being, I reworked it as a loop with timeout of 0 at select() and a call to time.sleep(), but, does anyone have any idea what's going on here?Dragan Juric2012-06-28T19:20:01Zpost93833: Re: Can't use more than 3.5GB of RAMDavid Sarrazinhttp://community.qnx.com/sf/go/post938332012-06-22T14:19:14Z2012-06-22T14:19:14ZThere is also a virtual memory limitation. Are you trying to allocate all of this memory in a single process?
----- Original Message -----
From: Chris Travis [mailto:community-noreply@qnx.com]
Sent: Friday, June 22, 2012 10:04 AM
To: ostech-core_os@community.qnx.com <ostech-core_os@community.qnx.com>; ostech-core_os <ostech-core_os@community.qnx.com>
Subject: Re: Can't use more than 3.5GB of RAM
Rebuild you're image with the -x option to startup.
Sent from my BlackBerry® PlayBook™
www.blackberry.com
________________________________
From: "noname noname" <community-noreply@qnx.com>
To: "ostech-core_os" <ostech-core_os@community.qnx.com>
Sent: 22 June, 2012 4:57 AM
Subject: Re: Can't use more than 3.5GB of RAM
Maybe QSS can build special version of QNX SDK Platform (self-hosted) for x86 with out-of-box support more 4GB of RAM. I'm think this will be usable feature.
Thanks.
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post93824
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post93832
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comDavid Sarrazin2012-06-22T14:19:14Zpost93832: Re: Can't use more than 3.5GB of RAMChris Travishttp://community.qnx.com/sf/go/post938322012-06-22T14:08:27Z2012-06-22T14:08:27ZRebuild you're image with the -x option to startup.
Sent from my BlackBerry® PlayBook™
www.blackberry.com
________________________________
From: "noname noname" <community-noreply@qnx.com>
To: "ostech-core_os" <ostech-core_os@community.qnx.com>
Sent: 22 June, 2012 4:57 AM
Subject: Re: Can't use more than 3.5GB of RAM
Maybe QSS can build special version of QNX SDK Platform (self-hosted) for x86 with out-of-box support more 4GB of RAM. I'm think this will be usable feature.
Thanks.
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post93824
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comChris Travis2012-06-22T14:08:27Zpost93824: Re: Can't use more than 3.5GB of RAMVitalyhttp://community.qnx.com/sf/go/post938242012-06-22T08:57:24Z2012-06-22T08:57:24ZMaybe QSS can build special version of QNX SDK Platform (self-hosted) for x86 with out-of-box support more 4GB of RAM. I'm think this will be usable feature.
Thanks.Vitaly2012-06-22T08:57:24Zpost93578: Re: Shutdown[0,0] ... QNX Version 6.5.0 Release 2010/07/09-14:35:30EDTPaul Osmialowskihttp://community.qnx.com/sf/go/post935782012-06-07T19:39:30Z2012-06-07T19:39:30ZSeems like you were right. The only line in init_raminfo() is add_ram which adds 8MB of memory (should be enough). I looked at add_ram() code and found that it calls alloc_ram() for the part of RAM that overlaps with loaded image (which is also true in my case). I looked at alloc_ram() code and found three remarked kprintf's left there - I unremarked them and what it printed, pointed me to the source of my problem: I was passing wrong base address to add_ram() in init_raminfo(). Now there's no kernel dump anymore, actually, there's nothing at all that could give me a clue that the system is working :( Maybe something is wrong with my script? What display_msg command actually does? Is it using callout_debug (which seems to work OK as I was able to see kernel dump) for producing the output?Paul Osmialowski2012-06-07T19:39:30Zpost93577: Re: Shutdown[0,0] ... QNX Version 6.5.0 Release 2010/07/09-14:35:30EDTSunil Kitturhttp://community.qnx.com/sf/go/post935772012-06-07T18:14:14Z2012-06-07T18:14:14ZThose SIGTRAP ones are essentially assertion failures in the code.
In this particular case line 347 of pa.c (reported as pa@347)
That particular one seems to be a failure to find a large enough
sysram chunk to satisfy an early kernel memory allocation.
Is your startup's init_raminfo() working correctly?
Sunil.
On 12-06-07 1:54 PM, Paul Osmialowski wrote:
> Something similar occured to me. Right after cpu_startnext() function started procnto:
>
> System page at phys:84709000 user:84709000 kern:84709000
> Starting next program at v84755bd4
>
> Shutdown[0,0] S/C/F=5/4/3 C/D=84732850/84799c4c state(c0)= now lock
> QNX Version 6.5.0 Release 2010/07/09-14:41:25EDT
> shle context[84798378]:
> 0000: 00000000 fffffff8 847983f0 00000000 00000000 00005100 00000000 84700000
> 0020: 1ffffffe 847983d0 00004fe0 1fffffff 84799f18 84799f14 84798468 847983d0
> 0040: 400000f1 8474b820 84708000 00000000 000000d0 8474b782
> instruction[8474b820] (pa@347):
> 03 a0 09 00 63 5f 79 84 5b 01 63 60 04 e2 2d 40 0c 70 d1 91 1c 35 01 76 2d 46
> stack[847983d0]:
> 0000: 00000002 00000000 00000000 8470b000 84bfffff 00000000 00000000 84700000
> 0020: 84707fff 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> 0040: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> 0060: 00000000 00000000 00000000 84798440 8470926d 00000000 8474b758 84798468
>
> Seems like there's no process started yet (no PID in kernel dump), addresses seem to be OK (things are where I loaded it using tftp), examining signal.h, sigininfo.h and fault.h gave me following S/C/F cause:
> - S: SIGTRAP
> - C: TRAP_CRASH (or NSIGTRAP)
> - F: BREAKPOINT instr.
>
> I have no clue why breakpoint instruction was reached. Image spec is like this:
>Sunil Kittur2012-06-07T18:14:14Zpost93576: Re: Shutdown[0,0] ... QNX Version 6.5.0 Release 2010/07/09-14:35:30EDTPaul Osmialowskihttp://community.qnx.com/sf/go/post935762012-06-07T17:54:37Z2012-06-07T17:54:37ZSomething similar occured to me. Right after cpu_startnext() function started procnto:
System page at phys:84709000 user:84709000 kern:84709000
Starting next program at v84755bd4
Shutdown[0,0] S/C/F=5/4/3 C/D=84732850/84799c4c state(c0)= now lock
QNX Version 6.5.0 Release 2010/07/09-14:41:25EDT
shle context[84798378]:
0000: 00000000 fffffff8 847983f0 00000000 00000000 00005100 00000000 84700000
0020: 1ffffffe 847983d0 00004fe0 1fffffff 84799f18 84799f14 84798468 847983d0
0040: 400000f1 8474b820 84708000 00000000 000000d0 8474b782
instruction[8474b820] (pa@347):
03 a0 09 00 63 5f 79 84 5b 01 63 60 04 e2 2d 40 0c 70 d1 91 1c 35 01 76 2d 46
stack[847983d0]:
0000: 00000002 00000000 00000000 8470b000 84bfffff 00000000 00000000 84700000
0020: 84707fff 00000000 00000000 00000000 00000000 00000000 00000000 00000000
0040: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
0060: 00000000 00000000 00000000 84798440 8470926d 00000000 8474b758 84798468
Seems like there's no process started yet (no PID in kernel dump), addresses seem to be OK (things are where I loaded it using tftp), examining signal.h, sigininfo.h and fault.h gave me following S/C/F cause:
- S: SIGTRAP
- C: TRAP_CRASH (or NSIGTRAP)
- F: BREAKPOINT instr.
I have no clue why breakpoint instruction was reached. Image spec is like this:
[image=0x84720000]
[virtual=shle,binary] .bootstrap = {
startup-mb442
PATH=/proc/boot procnto
}
libc.so
[type=link] /usr/lib/ldqnx.so.2=/proc/boot/libc.so
[+script] .script = {
display_msg Welcome to QNX Neutrino 6.5.0 on the mb442-derived board
SYSNAME=nto
TERM=qansi
HOME=/
LD_LIBRARY_PATH=.:/tmp/:/proc/boot:/usr/photon/lib:/dll:/lib:/lib/dll:/usr/lib:/usr/photon/dll:/opt/lib
PATH=.:/tmp:/proc/boot:.:/sbin:/usr/sbin:/usr/bin:/bin:/usr/local/bin:/usr/photon/bin:/opt/bin
[+session] ksh &
}
###########################################################################
## File system links
###########################################################################
[type=link] /bin/sh=/proc/boot/ksh
[type=link] /tmp=/dev/shmem
libcam.so.2
libm.so.2
###########################################################################
## QNX applications
###########################################################################
syslogd
ls
ksh
pipe
pidin
slogger
sloginfo
slay
mount
umount
cat
cp
rm
pipe
mkdir
kill
hogs
grep
chmod
sleep
tracelogger
shutdown
use
###########################################################################
## END OF BUILD SCRIPT
###########################################################################
As you can see, my welcome message wasn't displayed, kernel crashed earlier. I tried to change procnto to procnto-instr - no change, kernel dump is still the same. I placed plenty of kprintf in libstartup functions, all of them were displayed at boot time, so at least startup-mb442 seems to be OK. I feel not experienced enough to move further with this.Paul Osmialowski2012-06-07T17:54:37Zpost93559: Preventing buffer copies in SPI APIDevan Lippmanhttp://community.qnx.com/sf/go/post935592012-06-06T20:47:29Z2012-06-06T20:47:29ZI noticed that the SPI API provides both spi_xchange() and spi_dma_xchange(). Ideally I would like to read/write the buffers directly from application memory. While I don't have DMA enabled, could spi_dma_xchange() be used in my hardware interface to prevent the buffer copy from occurring? If so will the dma_xfer function have access to this physical memory or am I limited to the ISR?
Thanks,
DevanDevan Lippman2012-06-06T20:47:29Zpost93535: which & how to install compiler for ADA and Fortran? tried below stuff but stuck with errors >> g77: installation problemAtul Kumbharhttp://community.qnx.com/sf/go/post935352012-06-06T03:40:04Z2012-06-06T03:40:04ZThis is for Fortran. Please advice for ADA too.
Got this error :- g77: installation problem, cannot exec `as': No such file or directory
when followed the below links and those files I installed
1] http://www.ajam.org.pl/
gcc4.6.1-x86-qnx6.5.0-bld1.tar.bz2
2] http://www.opal-rt.com/kb-article/how-compile-fortran-code-qnx-61-632-or-650
g77-rtp6.1-files-010921.tgz
3] http://hintsforums.macworld.com/archive/index.php/t-62445.html
searched for 'as' in /usr/qnx650/host/x86/usr/bin
and at that to PATH /usr/qnx650/host/x86/usr/bin
'as' is assembler but its missing there and also in root/usr/bin
# echo $PATH
/sbin:/usr/sbin:/bin:/usr/bin:/usr/photon/bin:/usr/photon/appbuilder:/opt/X11R6/
bin:/usr/X11R6/bin:/usr/local/bin:/opt/bin:/opt/sbin
# uname -a
QNX localhost 6.5.0 2010/07/09-14:43:25EDT x86pc x86
# qconfig
$QNX_CONFIGURATION not set, -d not given, and/or /etc/qnx/qconfig doesn't exist.
snaps and add.f file is in zip file attachedAtul Kumbhar2012-06-06T03:40:04Zpost93448: Re[2]: interactions within the microkernelIgor Kutuzovhttp://community.qnx.com/sf/go/post934482012-06-01T11:33:42Z2012-06-01T11:33:42ZThank you for having responded. And I'll try to clarify. I am interested in how the microkernel jn level assembly instructionsIgor Kutuzov2012-06-01T11:33:42Zpost93436: Re: interactions within the microkernelJeevan Mathewhttp://community.qnx.com/sf/go/post934362012-05-31T21:59:55Z2012-05-31T21:59:55Z> As elements interact with each other microkernels? And what happens when the
> processes are executed in the kernel (as the interaction occurs at the level
> of teams)
Sorry, I am not really getting your point.
Processes are not executed in the kernel.
Please check this page to get more insight:
http://community.qnx.com/sf/wiki/do/viewPage/projects.core_os/wiki/KernelSystemCall
Hope this helps,
-JeevanJeevan Mathew2012-05-31T21:59:55Zpost93422: interactions within the microkernelIgor Kutuzovhttp://community.qnx.com/sf/go/post934222012-05-31T15:37:01Z2012-05-31T15:37:01ZAs elements interact with each other microkernels? And what happens when the processes are executed in the kernel (as the interaction occurs at the level of teams)Igor Kutuzov2012-05-31T15:37:01Zpost93306: Re: Problem with ClockCyclesSunil Kitturhttp://community.qnx.com/sf/go/post933062012-05-25T18:56:41Z2012-05-25T18:56:41ZWhat is the overhead of the ClockCycles() call?
eg. delta between 2 back-to-back ClockCycles()?
The code uses an emulation that traps into the kernel and calls
the BSP timer_value() callout to calculate a delta from the last
clock. The clock tick handler maintains a 64-bit counter that is
incremented by qtime->timer_load so that ClockCycles returns:
counter + qtime->timer_value()
On 12-05-25 2:31 PM, Bruno Silva wrote:
> I'm trying to measure the tick overhead in a Beagleboard-XM-REV C. That uses an arm processor.
> I get a problem when using the ClockCycles() system call, because the counter seems to start counting backward when I reduce the tick period.
>
> I've made the following code to confirm this situation:
>
> int main(int argc, char *argv[]) {
>
> _uint64 before_clkper, after_clkper;
> float cpu_freq;
> struct _clockperiod clkper;
>
> {
> struct sched_param param;
> int ret;
> param.sched_priority = sched_get_priority_max( SCHED_RR );
> ret = sched_setscheduler( 0, SCHED_RR,&param);
> assert ( ret != -1 );
> }
> cpu_freq = SYSPAGE_ENTRY( qtime )->cycles_per_sec;
> printf("Frequency of ClockCycles: %f\n", cpu_freq);
>
> clkper.nsec = 10000000;
> clkper.fract = 0;
> ClockPeriod ( CLOCK_REALTIME,&clkper, NULL, 0 );
>
>
> clkper.nsec = 10000;
> clkper.fract = 0;
> before_clkper= ClockCycles();
> ClockPeriod ( CLOCK_REALTIME,&clkper, NULL, 0 );
> after_clkper= ClockCycles();
> printf("Before clock period %lld. After clock period %lld\n", before_clkper, after_clkper);
> printf("Difference between clock period %lld\n", after_clkper-before_clkper);
> return 0;
> }
>
> The results were:
>
> Frequency of ClockCycles: 13000000.000000
> Before clock period 15088465604. After clock period 15088465368
> Difference between clock period -236
>
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post93305
> To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comSunil Kittur2012-05-25T18:56:41Zpost93305: Problem with ClockCyclesBruno Silvahttp://community.qnx.com/sf/go/post933052012-05-25T18:31:55Z2012-05-25T18:31:55ZI'm trying to measure the tick overhead in a Beagleboard-XM-REV C. That uses an arm processor.
I get a problem when using the ClockCycles() system call, because the counter seems to start counting backward when I reduce the tick period.
I've made the following code to confirm this situation:
int main(int argc, char *argv[]) {
_uint64 before_clkper, after_clkper;
float cpu_freq;
struct _clockperiod clkper;
{
struct sched_param param;
int ret;
param.sched_priority = sched_get_priority_max( SCHED_RR );
ret = sched_setscheduler( 0, SCHED_RR, &param);
assert ( ret != -1 );
}
cpu_freq = SYSPAGE_ENTRY( qtime )->cycles_per_sec;
printf("Frequency of ClockCycles: %f\n", cpu_freq);
clkper.nsec = 10000000;
clkper.fract = 0;
ClockPeriod ( CLOCK_REALTIME, &clkper, NULL, 0 );
clkper.nsec = 10000;
clkper.fract = 0;
before_clkper= ClockCycles();
ClockPeriod ( CLOCK_REALTIME, &clkper, NULL, 0 );
after_clkper= ClockCycles();
printf("Before clock period %lld. After clock period %lld\n", before_clkper, after_clkper);
printf("Difference between clock period %lld\n", after_clkper-before_clkper);
return 0;
}
The results were:
Frequency of ClockCycles: 13000000.000000
Before clock period 15088465604. After clock period 15088465368
Difference between clock period -236Bruno Silva2012-05-25T18:31:55Zpost92893: Linker options for qcc: QNX Build ErrorsRajesh Kannan Balasubramanianhttp://community.qnx.com/sf/go/post928932012-05-03T13:31:32Z2012-05-03T13:31:32ZHi, In QNX build, am seeing shared objects are generated instead of binary executable. While invoking qcc the option "-shared" is not passed but "-fPIC" is passed. Any one please give me a clue what will trigger qcc to generate shared object other than "-fPIC" option.Rajesh Kannan Balasubramanian2012-05-03T13:31:32Zpost92880: RE: Restoring STDIN after redirection on command line ...Thomas Haupthttp://community.qnx.com/sf/go/post928802012-05-02T11:38:38Z2012-05-02T11:38:38ZGlad to help. :)
- Thomas
-----Original Message-----
From: Robert Selby [mailto:Robert.Selby@snellgroup.com]
Sent: Mittwoch, 2. Mai 2012 13:34
To: ostech-core_os@community.qnx.com
Subject: RE: Restoring STDIN after redirection on command line ...
Very true ...
fc = fdopen(dup2(1, 0), "r");
seems to work OK too :-)
Thanks very much for the help :-)
Bob Selby
Senior Engineer, Software
Snell
Innovation in the
Multi-Screen World
T +44 (0) 118 921 4592 (direct)
T +44 (0) 118 986 6123 (switchboard)
F +44 (0) 118 975 4920
snellgroup.com
Hartman House, Danehill, Lower Earley, Reading, Berkshire, RG6 4PB UK
Routing | Modular Infrastructure | Conversion & Restoration | Live Production | Automation & Media Management | Control & Monitoring
-----Original Message-----
From: Thomas Haupt [mailto:thaupt@qnx.com]
Sent: 02 May 2012 12:29
To: 'ostech-core_os@community.qnx.com'
Subject: RE: Restoring STDIN after redirection on command line ...
Hi Bob,
that looks mostly reasonable. I'd still add a 'dup' or 'dup2', though, to have separate file descriptors for stdin and stdout.
Cheers,
Thomas
-----Original Message-----
From: Robert Selby [mailto:Robert.Selby@snellgroup.com]
Sent: Mittwoch, 2. Mai 2012 13:12
To: ostech-core_os@community.qnx.com
Subject: RE: Restoring STDIN after redirection on command line ...
Thanks for that :-)
I tried the following for "util < scriptfile" and it seems to do what I want ...
-----------------------------------------------------
FILE * fc = stdin;
...
fgets(fc, ... // Reads from redirected script file ...
On EOF I do ...
fclose(fc);
fc = fdopen(STDOUT_FILENO, "r") ) == NULL ) ...
fgets(fc, ... // Reads from keyboard
...
-----------------------------------------------------
Bob Selby
Senior Engineer, Software
Snell
Innovation in the
Multi-Screen World
T +44 (0) 118 921 4592 (direct)
T +44 (0) 118 986 6123 (switchboard)
F +44 (0) 118 975 4920
snellgroup.com
Hartman House, Danehill, Lower Earley, Reading, Berkshire, RG6 4PB UK
Routing | Modular Infrastructure | Conversion & Restoration | Live Production | Automation & Media Management | Control & Monitoring
-----Original Message-----
From: Thomas Haupt [mailto:thaupt@qnx.com]
Sent: 02 May 2012 11:24
To: 'ostech-core_os@community.qnx.com'
Subject: RE: Restoring STDIN after redirection on command line ...
Hi Bob,
I'm not sure if there is a really clean solution to your problem.
To achieve the desired behavior, you would need to:
- find out which device should become your new stdin
(as you noticed, /dev/tty isn't necessarily the right choice), and
- redirect the stream 'stdin' to take its input from that device.
Finding the appropriate device may be anywhere between not too hard and impossible. In the easy case, stdout or stderr refer to the TTY you want to use. In the worst case, they have been redirected to files or closed entirely, and your process has detached from its controlling terminal (i.e., become a daemon) - in this scenario, there'd be no reasonable guess which device to attach to.
Let's assume a simple case - stdout refers to a TTY.
You could of course just call dup2( 1, 0 ) to duplicate the stdout file descriptor and have the duplicate your current stdin fd. The problem is that the (FILE) stream object represented by *stdin will not be aware of this change. There is the fdopen() function to wrap a FILE object around an existing file descriptor, but that will allocate a new object, not use an existing one...
...and alas, *stdin/-out/-err are static _objects_ - so we cannot merely replace stdin by a new pointer.
You could try to flush and rewind the stdin stream, then call dup2( 1,
0 ) to replace the stdin file descriptor.
I'd suggest, though, to provide your input file via a command line argument and have a few custom input functions that will read either from that file or, once it reached EOF, the original stdin.
Cheers,
Thomas
-----Original Message-----
From: Bob Selby [mailto:robert.selby@snellgroup.com]
Sent: Mittwoch, 2. Mai 2012 10:46
To: ostech-core_os
Subject: Restoring STDIN after redirection on command line ...
A bit of a newbie question, possibly.
I am trying to have a QNX 650 built utility that normally accepts its input from stdin but can be run with a script file with "utility < scriptfile" and then revert to input from the keyboard when it hits EOF.
What is the best way to do this ??
Currently, at EOF I close "stdin" and then fopen("/dev/tty", "r") - this works well for the debug serial port but not for telnet, etc.
TIA,
Bob
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post92871
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post92875
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com
This email and any attachments are confidential, may be legally privileged and are intended for the use of the addressee only. If you are not the intended recipient, please note that any use, disclosure, printing or copying of this email is strictly prohibited and may be unlawful. If received in error, please delete this email and any attachments and confirm this to the sender.
Snell Limited, registered number 1160119 Registered in England, registered office at Hartman House, Danehill, Lower Earley, Reading, Berkshire RG6 4PB
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post92877
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post92878
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com
This email and any attachments are confidential, may be legally privileged and are intended for the use of the addressee only. If you are not the intended recipient, please note that any use, disclosure, printing or copying of this email is strictly prohibited and may be unlawful. If received in error, please delete this email and any attachments and confirm this to the sender.
Snell Limited, registered number 1160119 Registered in England, registered office at Hartman House, Danehill, Lower Earley, Reading, Berkshire RG6 4PB
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post92879
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comThomas Haupt2012-05-02T11:38:38Zpost92879: RE: Restoring STDIN after redirection on command line ...Bob Selbyhttp://community.qnx.com/sf/go/post928792012-05-02T11:37:03Z2012-05-02T11:37:03ZVery true ...
fc = fdopen(dup2(1, 0), "r");
seems to work OK too :-)
Thanks very much for the help :-)
Bob Selby
Senior Engineer, Software
Snell
Innovation in the
Multi-Screen World
T +44 (0) 118 921 4592 (direct)
T +44 (0) 118 986 6123 (switchboard)
F +44 (0) 118 975 4920
snellgroup.com
Hartman House, Danehill, Lower Earley, Reading, Berkshire, RG6 4PB UK
Routing | Modular Infrastructure | Conversion & Restoration | Live
Production | Automation & Media Management | Control & Monitoring
-----Original Message-----
From: Thomas Haupt [mailto:thaupt@qnx.com]
Sent: 02 May 2012 12:29
To: 'ostech-core_os@community.qnx.com'
Subject: RE: Restoring STDIN after redirection on command line ...
Hi Bob,
that looks mostly reasonable. I'd still add a 'dup' or 'dup2', though,
to have separate file descriptors for stdin and stdout.
Cheers,
Thomas
-----Original Message-----
From: Robert Selby [mailto:Robert.Selby@snellgroup.com]
Sent: Mittwoch, 2. Mai 2012 13:12
To: ostech-core_os@community.qnx.com
Subject: RE: Restoring STDIN after redirection on command line ...
Thanks for that :-)
I tried the following for "util < scriptfile" and it seems to do what I
want ...
-----------------------------------------------------
FILE * fc = stdin;
...
fgets(fc, ... // Reads from redirected script file ...
On EOF I do ...
fclose(fc);
fc = fdopen(STDOUT_FILENO, "r") ) == NULL ) ...
fgets(fc, ... // Reads from keyboard
...
-----------------------------------------------------
Bob Selby
Senior Engineer, Software
Snell
Innovation in the
Multi-Screen World
T +44 (0) 118 921 4592 (direct)
T +44 (0) 118 986 6123 (switchboard)
F +44 (0) 118 975 4920
snellgroup.com
Hartman House, Danehill, Lower Earley, Reading, Berkshire, RG6 4PB UK
Routing | Modular Infrastructure | Conversion & Restoration | Live
Production | Automation & Media Management | Control & Monitoring
-----Original Message-----
From: Thomas Haupt [mailto:thaupt@qnx.com]
Sent: 02 May 2012 11:24
To: 'ostech-core_os@community.qnx.com'
Subject: RE: Restoring STDIN after redirection on command line ...
Hi Bob,
I'm not sure if there is a really clean solution to your problem.
To achieve the desired behavior, you would need to:
- find out which device should become your new stdin
(as you noticed, /dev/tty isn't necessarily the right choice), and
- redirect the stream 'stdin' to take its input from that device.
Finding the appropriate device may be anywhere between not too hard and
impossible. In the easy case, stdout or stderr refer to the TTY you want
to use. In the worst case, they have been redirected to files or closed
entirely, and your process has detached from its controlling terminal
(i.e., become a daemon) - in this scenario, there'd be no reasonable
guess which device to attach to.
Let's assume a simple case - stdout refers to a TTY.
You could of course just call dup2( 1, 0 ) to duplicate the stdout
file descriptor and have the duplicate your current stdin fd. The
problem is that the (FILE) stream object represented by *stdin will not
be aware of this change. There is the fdopen() function to wrap a FILE
object around an existing file descriptor, but that will allocate a new
object, not use an existing one...
...and alas, *stdin/-out/-err are static _objects_ - so we cannot merely
replace stdin by a new pointer.
You could try to flush and rewind the stdin stream, then call dup2( 1,
0 ) to replace the stdin file descriptor.
I'd suggest, though, to provide your input file via a command line
argument and have a few custom input functions that will read either
from that file or, once it reached EOF, the original stdin.
Cheers,
Thomas
-----Original Message-----
From: Bob Selby [mailto:robert.selby@snellgroup.com]
Sent: Mittwoch, 2. Mai 2012 10:46
To: ostech-core_os
Subject: Restoring STDIN after redirection on command line ...
A bit of a newbie question, possibly.
I am trying to have a QNX 650 built utility that normally accepts its
input from stdin but can be run with a script file with "utility <
scriptfile" and then revert to input from the keyboard when it hits EOF.
What is the best way to do this ??
Currently, at EOF I close "stdin" and then fopen("/dev/tty", "r") - this
works well for the debug serial port but not for telnet, etc.
TIA,
Bob
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post92871
To cancel your subscription to this discussion, please e-mail
ostech-core_os-unsubscribe@community.qnx.com
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post92875
To cancel your subscription to this discussion, please e-mail
ostech-core_os-unsubscribe@community.qnx.com
This email and any attachments are confidential, may be legally
privileged and are intended for the use of the addressee only. If you
are not the intended recipient, please note that any use, disclosure,
printing or copying of this email is strictly prohibited and may be
unlawful. If received in error, please delete this email and any
attachments and confirm this to the sender.
Snell Limited, registered number 1160119 Registered in England,
registered office at Hartman House, Danehill, Lower Earley, Reading,
Berkshire RG6 4PB
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post92877
To cancel your subscription to this discussion, please e-mail
ostech-core_os-unsubscribe@community.qnx.com
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post92878
To cancel your subscription to this discussion, please e-mail
ostech-core_os-unsubscribe@community.qnx.com
This email and any attachments are confidential, may be legally privileged and are intended for the use of the addressee only. If you are not the intended recipient, please note that any use, disclosure, printing or copying of this email is strictly prohibited and may be unlawful. If received in error, please delete this email and any attachments and confirm this to the sender.
Snell Limited, registered number 1160119
Registered in England, registered office at Hartman House, Danehill, Lower Earley, Reading, Berkshire RG6 4PBBob Selby2012-05-02T11:37:03Zpost92878: RE: Restoring STDIN after redirection on command line ...Thomas Haupthttp://community.qnx.com/sf/go/post928782012-05-02T11:31:58Z2012-05-02T11:31:58ZHi Bob,
that looks mostly reasonable. I'd still add a 'dup' or 'dup2',
though, to have separate file descriptors for stdin and stdout.
Cheers,
Thomas
-----Original Message-----
From: Robert Selby [mailto:Robert.Selby@snellgroup.com]
Sent: Mittwoch, 2. Mai 2012 13:12
To: ostech-core_os@community.qnx.com
Subject: RE: Restoring STDIN after redirection on command line ...
Thanks for that :-)
I tried the following for "util < scriptfile" and it seems to do what I want ...
-----------------------------------------------------
FILE * fc = stdin;
...
fgets(fc, ... // Reads from redirected script file ...
On EOF I do ...
fclose(fc);
fc = fdopen(STDOUT_FILENO, "r") ) == NULL ) ...
fgets(fc, ... // Reads from keyboard
...
-----------------------------------------------------
Bob Selby
Senior Engineer, Software
Snell
Innovation in the
Multi-Screen World
T +44 (0) 118 921 4592 (direct)
T +44 (0) 118 986 6123 (switchboard)
F +44 (0) 118 975 4920
snellgroup.com
Hartman House, Danehill, Lower Earley, Reading, Berkshire, RG6 4PB UK
Routing | Modular Infrastructure | Conversion & Restoration | Live Production | Automation & Media Management | Control & Monitoring
-----Original Message-----
From: Thomas Haupt [mailto:thaupt@qnx.com]
Sent: 02 May 2012 11:24
To: 'ostech-core_os@community.qnx.com'
Subject: RE: Restoring STDIN after redirection on command line ...
Hi Bob,
I'm not sure if there is a really clean solution to your problem.
To achieve the desired behavior, you would need to:
- find out which device should become your new stdin
(as you noticed, /dev/tty isn't necessarily the right choice), and
- redirect the stream 'stdin' to take its input from that device.
Finding the appropriate device may be anywhere between not too hard and impossible. In the easy case, stdout or stderr refer to the TTY you want to use. In the worst case, they have been redirected to files or closed entirely, and your process has detached from its controlling terminal (i.e., become a daemon) - in this scenario, there'd be no reasonable guess which device to attach to.
Let's assume a simple case - stdout refers to a TTY.
You could of course just call dup2( 1, 0 ) to duplicate the stdout file descriptor and have the duplicate your current stdin fd. The problem is that the (FILE) stream object represented by *stdin will not be aware of this change. There is the fdopen() function to wrap a FILE object around an existing file descriptor, but that will allocate a new object, not use an existing one...
...and alas, *stdin/-out/-err are static _objects_ - so we cannot merely replace stdin by a new pointer.
You could try to flush and rewind the stdin stream, then call dup2( 1,
0 ) to replace the stdin file descriptor.
I'd suggest, though, to provide your input file via a command line argument and have a few custom input functions that will read either from that file or, once it reached EOF, the original stdin.
Cheers,
Thomas
-----Original Message-----
From: Bob Selby [mailto:robert.selby@snellgroup.com]
Sent: Mittwoch, 2. Mai 2012 10:46
To: ostech-core_os
Subject: Restoring STDIN after redirection on command line ...
A bit of a newbie question, possibly.
I am trying to have a QNX 650 built utility that normally accepts its input from stdin but can be run with a script file with "utility < scriptfile" and then revert to input from the keyboard when it hits EOF.
What is the best way to do this ??
Currently, at EOF I close "stdin" and then fopen("/dev/tty", "r") - this works well for the debug serial port but not for telnet, etc.
TIA,
Bob
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post92871
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post92875
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com
This email and any attachments are confidential, may be legally privileged and are intended for the use of the addressee only. If you are not the intended recipient, please note that any use, disclosure, printing or copying of this email is strictly prohibited and may be unlawful. If received in error, please delete this email and any attachments and confirm this to the sender.
Snell Limited, registered number 1160119 Registered in England, registered office at Hartman House, Danehill, Lower Earley, Reading, Berkshire RG6 4PB
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post92877
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comThomas Haupt2012-05-02T11:31:58Zpost92877: RE: Restoring STDIN after redirection on command line ...Bob Selbyhttp://community.qnx.com/sf/go/post928772012-05-02T11:15:02Z2012-05-02T11:15:02ZThanks for that :-)
I tried the following for "util < scriptfile" and it seems to do what I
want ...
-----------------------------------------------------
FILE * fc = stdin;
...
fgets(fc, ... // Reads from redirected script file
...
On EOF I do ...
fclose(fc);
fc = fdopen(STDOUT_FILENO, "r") ) == NULL )
...
fgets(fc, ... // Reads from keyboard
...
-----------------------------------------------------
Bob Selby
Senior Engineer, Software
Snell
Innovation in the
Multi-Screen World
T +44 (0) 118 921 4592 (direct)
T +44 (0) 118 986 6123 (switchboard)
F +44 (0) 118 975 4920
snellgroup.com
Hartman House, Danehill, Lower Earley, Reading, Berkshire, RG6 4PB UK
Routing | Modular Infrastructure | Conversion & Restoration | Live
Production | Automation & Media Management | Control & Monitoring
-----Original Message-----
From: Thomas Haupt [mailto:thaupt@qnx.com]
Sent: 02 May 2012 11:24
To: 'ostech-core_os@community.qnx.com'
Subject: RE: Restoring STDIN after redirection on command line ...
Hi Bob,
I'm not sure if there is a really clean solution to your problem.
To achieve the desired behavior, you would need to:
- find out which device should become your new stdin
(as you noticed, /dev/tty isn't necessarily the right choice), and
- redirect the stream 'stdin' to take its input from that device.
Finding the appropriate device may be anywhere between not too hard and
impossible. In the easy case, stdout or stderr refer to the TTY you want
to use. In the worst case, they have been redirected to files or closed
entirely, and your process has detached from its controlling terminal
(i.e., become a daemon) - in this scenario, there'd be no reasonable
guess which device to attach to.
Let's assume a simple case - stdout refers to a TTY.
You could of course just call dup2( 1, 0 ) to duplicate the stdout
file descriptor and have the duplicate your current stdin fd. The
problem is that the (FILE) stream object represented by *stdin will not
be aware of this change. There is the fdopen() function to wrap a FILE
object around an existing file descriptor, but that will allocate a new
object, not use an existing one...
...and alas, *stdin/-out/-err are static _objects_ - so we cannot merely
replace stdin by a new pointer.
You could try to flush and rewind the stdin stream, then call dup2( 1,
0 ) to replace the stdin file descriptor.
I'd suggest, though, to provide your input file via a command line
argument and have a few custom input functions that will read either
from that file or, once it reached EOF, the original stdin.
Cheers,
Thomas
-----Original Message-----
From: Bob Selby [mailto:robert.selby@snellgroup.com]
Sent: Mittwoch, 2. Mai 2012 10:46
To: ostech-core_os
Subject: Restoring STDIN after redirection on command line ...
A bit of a newbie question, possibly.
I am trying to have a QNX 650 built utility that normally accepts its
input from stdin but can be run with a script file with "utility <
scriptfile" and then revert to input from the keyboard when it hits EOF.
What is the best way to do this ??
Currently, at EOF I close "stdin" and then fopen("/dev/tty", "r") - this
works well for the debug serial port but not for telnet, etc.
TIA,
Bob
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post92871
To cancel your subscription to this discussion, please e-mail
ostech-core_os-unsubscribe@community.qnx.com
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post92875
To cancel your subscription to this discussion, please e-mail
ostech-core_os-unsubscribe@community.qnx.com
This email and any attachments are confidential, may be legally privileged and are intended for the use of the addressee only. If you are not the intended recipient, please note that any use, disclosure, printing or copying of this email is strictly prohibited and may be unlawful. If received in error, please delete this email and any attachments and confirm this to the sender.
Snell Limited, registered number 1160119
Registered in England, registered office at Hartman House, Danehill, Lower Earley, Reading, Berkshire RG6 4PBBob Selby2012-05-02T11:15:02Zpost92875: RE: Restoring STDIN after redirection on command line ...Thomas Haupthttp://community.qnx.com/sf/go/post928752012-05-02T10:26:41Z2012-05-02T10:26:41ZHi Bob,
I'm not sure if there is a really clean solution to your problem.
To achieve the desired behavior, you would need to:
- find out which device should become your new stdin
(as you noticed, /dev/tty isn't necessarily the right choice), and
- redirect the stream 'stdin' to take its input from that device.
Finding the appropriate device may be anywhere between not too hard
and impossible. In the easy case, stdout or stderr refer to the TTY
you want to use. In the worst case, they have been redirected to
files or closed entirely, and your process has detached from its
controlling terminal (i.e., become a daemon) - in this scenario,
there'd be no reasonable guess which device to attach to.
Let's assume a simple case - stdout refers to a TTY.
You could of course just call dup2( 1, 0 ) to duplicate the
stdout file descriptor and have the duplicate your current stdin
fd. The problem is that the (FILE) stream object represented by
*stdin will not be aware of this change. There is the fdopen()
function to wrap a FILE object around an existing file descriptor,
but that will allocate a new object, not use an existing one...
...and alas, *stdin/-out/-err are static _objects_ - so we cannot
merely replace stdin by a new pointer.
You could try to flush and rewind the stdin stream, then
call dup2( 1, 0 ) to replace the stdin file descriptor.
I'd suggest, though, to provide your input file via a command line
argument and have a few custom input functions that will read either
from that file or, once it reached EOF, the original stdin.
Cheers,
Thomas
-----Original Message-----
From: Bob Selby [mailto:robert.selby@snellgroup.com]
Sent: Mittwoch, 2. Mai 2012 10:46
To: ostech-core_os
Subject: Restoring STDIN after redirection on command line ...
A bit of a newbie question, possibly.
I am trying to have a QNX 650 built utility that normally accepts its input from stdin but can be run with a script file with "utility < scriptfile" and then revert to input from the keyboard when it hits EOF.
What is the best way to do this ??
Currently, at EOF I close "stdin" and then fopen("/dev/tty", "r") - this works well for the debug serial port but not for telnet, etc.
TIA,
Bob
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post92871
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.comThomas Haupt2012-05-02T10:26:41Zpost92871: Restoring STDIN after redirection on command line ...Bob Selbyhttp://community.qnx.com/sf/go/post928712012-05-02T08:46:01Z2012-05-02T08:46:01ZA bit of a newbie question, possibly.
I am trying to have a QNX 650 built utility that normally accepts its input from stdin but can be run with a script file with "utility < scriptfile" and then revert to input from the keyboard when it hits EOF.
What is the best way to do this ??
Currently, at EOF I close "stdin" and then fopen("/dev/tty", "r") - this works well for the debug serial port but not for telnet, etc.
TIA,
BobBob Selby2012-05-02T08:46:01Zpost92750: select_attach read callback with no dataMark Dowdyhttp://community.qnx.com/sf/go/post927502012-04-26T20:49:00Z2012-04-26T20:49:00ZWe register a callback using select_attach on a file descriptor for /dev/ser1 with the SELECT_FLAG_READ and SELECT_FLAG_REARM flags and we're occasionally seeing cases where our callback is called and read() returns 0 bytes. Once this 0 byte read happens, a kernel trace shows the system going into a tight loop of ionotify, read 0 bytes, ionotify, read 0 bytes, etc.. Any ideas what could be causing devc-ser8250 to fire the callback when no data is actually pending? Thanks.
MarkMark Dowdy2012-04-26T20:49:00Zpost92698: Re: RE: How to reboot really fast?janusz ruszelhttp://community.qnx.com/sf/go/post926982012-04-23T14:40:20Z2012-04-23T14:40:20ZAnother fast reboot method. It is not very friendly to the file system. It solves known shutdown problems on some x86 boards under QNX 6.5.0.
#define KBD_CTRL_IO 0x64
int
main( void )
{
uintptr_t hndl;
if (ThreadCtl (_NTO_TCTL_IO, 0) != -1)
{
if ( (hndl = mmap_device_io(2, KBD_CTRL_IO)) != MAP_DEVICE_FAILED)
{
/* disable interrupts when accesing hardware */
/* write to the keyboard port system reset command */
asm("cli");
out8(KBD_CTRL_IO, 0xfe);
// should not get here
exit (EXIT_SUCCESS);
}
}
exit(EXIT_FAILURE);
}janusz ruszel2012-04-23T14:40:20Zpost92669: Re: Device register mapping in ARMSunil Kitturhttp://community.qnx.com/sf/go/post926692012-04-20T12:49:25Z2012-04-20T12:49:25ZMemory mapped I/O doesn't require privileged mode, so _NTO_TCTL_IO is
essentially only required to manipulate the CPSR I bit to disable
interrupts.
Sunil.
On 12-04-20 5:56 AM, Richard Jones wrote:
> I'd also like to know the answer to this question.
>
> i.e mmap_device_io appears to allow I/O access without I/O priveleges even though the documentation indicates ThreadCtl(...) is required.
>
> Is this an aspect of ARM memory mapped I/O and therefore only root permissions are required in order to do the mapping in the first place, or is this an oversight in the documentation that should indicate this isn't strictly necessary for ARM processors but should be coded thus for portability?
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post92662
>Sunil Kittur2012-04-20T12:49:25Zpost92662: Re: Device register mapping in ARMRichard Joneshttp://community.qnx.com/sf/go/post926622012-04-20T09:56:17Z2012-04-20T09:56:17ZI'd also like to know the answer to this question.
i.e mmap_device_io appears to allow I/O access without I/O priveleges even though the documentation indicates ThreadCtl(...) is required.
Is this an aspect of ARM memory mapped I/O and therefore only root permissions are required in order to do the mapping in the first place, or is this an oversight in the documentation that should indicate this isn't strictly necessary for ARM processors but should be coded thus for portability?Richard Jones2012-04-20T09:56:17Zpost92617: socketCAN in qnxRanjit Paulrajhttp://community.qnx.com/sf/go/post926172012-04-18T16:13:25Z2012-04-18T16:13:25ZIs there socketCAN driver available for qnx 6.4.1?
We like to have IP over CAN.
Regards,
RanjitRanjit Paulraj2012-04-18T16:13:25Zpost92603: Device register mapping in ARMRanjit Paulrajhttp://community.qnx.com/sf/go/post926032012-04-18T12:22:53Z2012-04-18T12:22:53Zwe are using AT91SAM9263 on QNX 6.4.1. As per QNX documentation 'mmap_device_io()' should be called only with io privileges. i.e)calling thread should have called ThreadCtl() with the _NTO_TCTL_IO before using mmap_device_io().
I got following code to toggle gpio port. I am able to run this code successful without io privilege.
fyi, I am running this code as 'root'.
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <sys/mman.h>
#include <arm/at91sam9263.h>
#include <sys/types.h>
#include <hw/inout.h>
int main(int argc, char *argv[]) {
volatile uintptr_t gpio_hw_vbase = (uintptr_t)MAP_FAILED;
gpio_hw_vbase = mmap_device_io((size_t)(5u * (uint_t)AT91SAM9263_PIO_SIZE), (uint64_t)AT91SAM9263_PIOA_BASE);
if(gpio_hw_vbase == MAP_FAILED)
{
printf("map failed, no io privilege");
}
else
{
printf("map success, io privilege granted");
out32( (uintptr_t)(gpio_hw_vbase + ((uintptr_t)2*(uintptr_t)AT91SAM9263_PIO_SIZE) + AT91SAM9263_PIO_SODR), (uint32_t)0x00001000u );
getchar();
out32( (uintptr_t)(gpio_hw_vbase + ((uintptr_t)2*(uintptr_t)AT91SAM9263_PIO_SIZE) + AT91SAM9263_PIO_CODR), (uint32_t)0x00001000u );
}
return EXIT_SUCCESS;
}Ranjit Paulraj2012-04-18T12:22:53Zpost92599: Re: RE: check io privileges of a thread/processRanjit Paulrajhttp://community.qnx.com/sf/go/post925992012-04-18T11:56:48Z2012-04-18T11:56:48ZThanks for the explanation. It is very useful.
RanjitRanjit Paulraj2012-04-18T11:56:48Zpost92445: Re: HAMGervais Mulongoyhttp://community.qnx.com/sf/go/post924452012-04-04T11:44:06Z2012-04-04T11:44:06ZThe priority is likely inherited through from a pulse or a message that
is sent from the ham thread to the threads in question. See the
following about QNX Neutrino IPC, specifically the heading on "Priority
Inheritance and messages":
http://www.qnx.com/developers/docs/6.5.0/index.jsp?topic=/com.qnx.doc.neutrino_sys_arch/ipc.htmlGervais Mulongoy2012-04-04T11:44:06Zpost92433: HAMRanajit Samadderhttp://community.qnx.com/sf/go/post924332012-04-04T00:47:57Z2012-04-04T00:47:57ZStopping ham by executing the command hamctrl -stop makes few running threads inherits the ham priority and make the system appear non-responsive. It appears that one of the thread which can occupy the entire cpu time, if allowed, is inheriting the ham priority and not allowing any other threads a chance to run.
Any thoughts on how a thread can inherit the ham priority when the ham is stopped?Ranajit Samadder2012-04-04T00:47:57Zpost92244: RE: check io privileges of a thread/processSteve Reidhttp://community.qnx.com/sf/go/post922442012-03-22T15:20:43Z2012-03-22T15:20:43ZI'll create a PR to add the "F" format to the docs. Thanks for the explanation.
Steve Reid (stever@qnx.com)
Technical Editor
QNX Software Systems
-----Original Message-----
From: Brian Stecher [mailto:community-noreply@qnx.com]
Sent: Thursday, March 22, 2012 10:54 AM
To: ostech-core_os
Subject: Re: check io privileges of a thread/process
Thread flags are different from process flags.
#define _NTO_TF_IOPRIV 0x80000000
On Thu, Mar 22, 2012 at 10:30:25AM -0400, Steve Reid wrote:
> The docs for pidin call that bit _NTO_PF_THREADWATCH. Is that correct?
>
> Steve Reid (stever@qnx.com)
> Technical Editor
> QNX Software Systems
>
>
> -----Original Message-----
> From: Brian Stecher [mailto:community-noreply@qnx.com]
> Sent: Wednesday, March 21, 2012 8:43 AM
> To: ostech-core_os
> Subject: Re: check io privileges of a thread/process
>
> It's not in the usage message but "pidin -faNbF" will display the thread flags.
> If the 0x80000000 bit is on, that thread has io priv.
>
> Brian
>
> On Wed, Mar 21, 2012 at 08:35:02AM -0400, Ranjit Paulraj wrote:
> > Due to a overlook, we end up having multiple process having io privileges. So, many user processes are running in system mode. We have fixed this problem. Now we wanted to check whether io privileges are removed for user processes. shell commands like 'ps' or 'pidin' do not seem to display this status. Is there any other way to check this status?
> >
> >
> >
> > _______________________________________________
> >
> > OSTech
> > http://community.qnx.com/sf/go/post92220
> >
>
> --
> Brian Stecher (bstecher@qnx.com) QNX Software Systems Limited
> phone: +1 (613) 591-0931 (voice) 1001 Farrar Road
> +1 (613) 591-3579 (fax) Kanata, Ontario, Canada K2K 0B3
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post92221
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post92239
>
--
Brian Stecher (bstecher@qnx.com) QNX Software Systems Limited
phone: +1 (613) 591-0931 (voice) 1001 Farrar Road
+1 (613) 591-3579 (fax) Kanata, Ontario, Canada K2K 0B3
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post92241Steve Reid2012-03-22T15:20:43Zpost92241: Re: check io privileges of a thread/processBrian Stecherhttp://community.qnx.com/sf/go/post922412012-03-22T14:54:27Z2012-03-22T14:54:27ZThread flags are different from process flags.
#define _NTO_TF_IOPRIV 0x80000000
On Thu, Mar 22, 2012 at 10:30:25AM -0400, Steve Reid wrote:
> The docs for pidin call that bit _NTO_PF_THREADWATCH. Is that correct?
>
> Steve Reid (stever@qnx.com)
> Technical Editor
> QNX Software Systems
>
>
> -----Original Message-----
> From: Brian Stecher [mailto:community-noreply@qnx.com]
> Sent: Wednesday, March 21, 2012 8:43 AM
> To: ostech-core_os
> Subject: Re: check io privileges of a thread/process
>
> It's not in the usage message but "pidin -faNbF" will display the thread flags.
> If the 0x80000000 bit is on, that thread has io priv.
>
> Brian
>
> On Wed, Mar 21, 2012 at 08:35:02AM -0400, Ranjit Paulraj wrote:
> > Due to a overlook, we end up having multiple process having io privileges. So, many user processes are running in system mode. We have fixed this problem. Now we wanted to check whether io privileges are removed for user processes. shell commands like 'ps' or 'pidin' do not seem to display this status. Is there any other way to check this status?
> >
> >
> >
> > _______________________________________________
> >
> > OSTech
> > http://community.qnx.com/sf/go/post92220
> >
>
> --
> Brian Stecher (bstecher@qnx.com) QNX Software Systems Limited
> phone: +1 (613) 591-0931 (voice) 1001 Farrar Road
> +1 (613) 591-3579 (fax) Kanata, Ontario, Canada K2K 0B3
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post92221
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post92239
>
--
Brian Stecher (bstecher@qnx.com) QNX Software Systems Limited
phone: +1 (613) 591-0931 (voice) 1001 Farrar Road
+1 (613) 591-3579 (fax) Kanata, Ontario, Canada K2K 0B3Brian Stecher2012-03-22T14:54:27Zpost92239: RE: check io privileges of a thread/processSteve Reidhttp://community.qnx.com/sf/go/post922392012-03-22T14:30:24Z2012-03-22T14:30:24ZThe docs for pidin call that bit _NTO_PF_THREADWATCH. Is that correct?
Steve Reid (stever@qnx.com)
Technical Editor
QNX Software Systems
-----Original Message-----
From: Brian Stecher [mailto:community-noreply@qnx.com]
Sent: Wednesday, March 21, 2012 8:43 AM
To: ostech-core_os
Subject: Re: check io privileges of a thread/process
It's not in the usage message but "pidin -faNbF" will display the thread flags.
If the 0x80000000 bit is on, that thread has io priv.
Brian
On Wed, Mar 21, 2012 at 08:35:02AM -0400, Ranjit Paulraj wrote:
> Due to a overlook, we end up having multiple process having io privileges. So, many user processes are running in system mode. We have fixed this problem. Now we wanted to check whether io privileges are removed for user processes. shell commands like 'ps' or 'pidin' do not seem to display this status. Is there any other way to check this status?
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post92220
>
--
Brian Stecher (bstecher@qnx.com) QNX Software Systems Limited
phone: +1 (613) 591-0931 (voice) 1001 Farrar Road
+1 (613) 591-3579 (fax) Kanata, Ontario, Canada K2K 0B3
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post92221Steve Reid2012-03-22T14:30:24Zpost92221: Re: check io privileges of a thread/processBrian Stecherhttp://community.qnx.com/sf/go/post922212012-03-21T12:42:51Z2012-03-21T12:42:51ZIt's not in the usage message but "pidin -faNbF" will display the thread flags.
If the 0x80000000 bit is on, that thread has io priv.
Brian
On Wed, Mar 21, 2012 at 08:35:02AM -0400, Ranjit Paulraj wrote:
> Due to a overlook, we end up having multiple process having io privileges. So, many user processes are running in system mode. We have fixed this problem. Now we wanted to check whether io privileges are removed for user processes. shell commands like 'ps' or 'pidin' do not seem to display this status. Is there any other way to check this status?
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post92220
>
--
Brian Stecher (bstecher@qnx.com) QNX Software Systems Limited
phone: +1 (613) 591-0931 (voice) 1001 Farrar Road
+1 (613) 591-3579 (fax) Kanata, Ontario, Canada K2K 0B3Brian Stecher2012-03-21T12:42:51Zpost92220: check io privileges of a thread/processRanjit Paulrajhttp://community.qnx.com/sf/go/post922202012-03-21T12:35:02Z2012-03-21T12:35:02ZDue to a overlook, we end up having multiple process having io privileges. So, many user processes are running in system mode. We have fixed this problem. Now we wanted to check whether io privileges are removed for user processes. shell commands like 'ps' or 'pidin' do not seem to display this status. Is there any other way to check this status?Ranjit Paulraj2012-03-21T12:35:02Zpost92215: Re: missing function getopt_long() in libcZahira Ammarguellathttp://community.qnx.com/sf/go/post922152012-03-20T20:29:31Z2012-03-20T20:29:31ZHello,
I am looking for the getopt_long function compiled for QNX/ARM. Is there a version out there?
If not where I can find a src package that I can build?
Thanks,
-ZahiraZahira Ammarguellat2012-03-20T20:29:31Zpost92100: can some pleaseexplain the cache callout code.ravinder arehttp://community.qnx.com/sf/go/post921002012-03-14T01:58:10Z2012-03-14T01:58:10ZDear QNX forum,
I am trying to understand these call outs implementation,
1. Is this code is for L1 cache or L2 cache ? if L2 , does L2 also has separate data and instruction cache areas?
2. cache_mp11_i and cache_mp11_d , what are they representing ? data cahne and instruction cahce?
3. How much cache memory is available in this file. Is it 32*64*1024/8 = 256 KB ? or it is implementation for a 512KB cache?
4. If I want to change it to 1MB cache , what are the changes required ?
5. Where can I find help for the CP15 instructions used here ? any link ?
6. Where else we will tell to the QNX OS about the
7. If this code is not for L2 cache. Pleas provide information / location where I have to see for L2 cache code.
Thanks,
Ravinder Are
#
# Copyright 2007, 2008, QNX Software Systems.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not reproduce, modify or distribute this software except in
# compliance with the License. You may obtain a copy of the License
# at: http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTIES OF ANY KIND, either express or implied.
#
# This file may contain contributions from others, either as
# contributors under the License or as licensors under other terms.
# Please review this entire file for other proprietary rights or license
# notices, as well as the QNX Development Suite License Guide at
# http://licensing.qnx.com/license-guide/ for other information.
#
/*
* ARM11 MPcore specific cache operations
*
* unsigned control(paddr32_t base,
* unsigned num_lines,
* int flags,
* struct cacheattr_entry *cache,
* volatile struct syspage_entry * )
*/
#include "callout.ah"
#define MAX_LINES 32
#define LINE_SIZE 32
CALLOUT_START(cache_mp11_i, 0, 0)
/*
* Trim the address to a cache line boundary, and stop at 32 lines
* to avoid having to re-issue the whole flush if we get preempted
*/
bic r3, r0, #0x1f
cmp r1, #MAX_LINES
movhi r1, #MAX_LINES
mov r0, r1
/*
* Invalidate lines by address
*/
0: mcr p15, 0, r3, c7, c5, 1
add r3, r3, #LINE_SIZE
subs r1, r1, #1
bne 0b
mov pc, lr
CALLOUT_END(cache_mp11_i)
CALLOUT_START(cache_mp11_d, 0, 0)
/*
* Trim the address to a cache line boundary, and stop at 32 lines
* to avoid having to re-issue the whole flush if we get preempted
*/
bic r3, r0, #0x1f
cmp r1, #MAX_LINES
movhi r1, #MAX_LINES
mov r0, r1
tst r2, #MS_INVALIDATE
bne 1f
/*
* Clean lines by address
*/
0: mcr p15, 0, r3, c7, c10, 1
add r3, r3, #LINE_SIZE
subs r1, r1, #1
bne 0b
/*
* Drain write buffer
*/
mcr p15, 0, r1, c7, c10, 4
mov pc, lr
/*
* Clean and invalidate lines by address
*/
1: mcr p15, 0, r3, c7, c14, 1
add r3, r3, #LINE_SIZE
subs r1, r1, #1
bne 1b
/*
* Drain write buffer
*/
mcr p15, 0, r1, c7, c10, 4
mov pc, lr
CALLOUT_END(cache_mp11_d)ravinder are2012-03-14T01:58:10Zpost92083: Re: RE: RE: shm_ctl() fails when setting up a shared memory physical DMA buffer for a PCI cardIain Martinhttp://community.qnx.com/sf/go/post920832012-03-13T14:10:51Z2012-03-13T14:10:51ZIt's a long story so I'll be as brief as possible. I'm writing a QNX driver for our PCI and PCIe boards which have 3 data links. I do have a working driver using mmap and memoffset64 but this limits access to the driver buffers to the driver process.
I originally designesd our QNX driver as a full resource manager driver but I found that there was a problem with multiple reads and writes (i.e. serviing 3 duplex data links concurrently). I documented this issue at: http://community.qnx.com/sf/discussion/do/listPosts/projects.community/discussion.community.topc21108
and never found a solution. We needed to get driver released so I kept the resource manager but bypassed read and write, instead using a seperate thread (and shared events) for each readlink and write link to copy data to/from the dma buffers to/from shared memory buffers accessed by a higher level API running in a user process. This works reliably but is too processor intensive. So, to improve this, the obvious solution is to use a single buffer to DMA in and out of that our driver interface API (running in a user process) can memcpy in/out of.Iain Martin2012-03-13T14:10:51Zpost92079: RE: RE: shm_ctl() fails when setting up a shared memory physical
DMA buffer for a PCI cardThomas Haupthttp://community.qnx.com/sf/go/post920792012-03-13T13:55:06Z2012-03-13T13:55:06ZHi Iain,
that's a bit weird; I tested on a quad-core SMP x86 machine with QNX 6.5.0 as well...
Here's a question for you: Do you actually need that DMA memory to be in a shared memory object? If you only needed access to the memory in the application that allocates the memory, you could use only mmap() and mem_offset().
Cheers,
Thomas
-----Original Message-----
From: Iain Martin [mailto:community-noreply@qnx.com]
Sent: Dienstag, 13. März 2012 14:50
To: ostech-core_os
Subject: Re: RE: shm_ctl() fails when setting up a shared memory physical DMA buffer for a PCI card
Thanks for your quick reply. Unfortunately, it also fails for me the first time I run it, when there is no physical memory associated with the shared memory object. I retested with a new memory object to confirm this.
As it works for you the first time, that suggests to me that the approach I'm taking is sensible?
I neglected to mention that I am using QNX 6.5.0.
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post92078Thomas Haupt2012-03-13T13:55:06Zpost92078: Re: RE: shm_ctl() fails when setting up a shared memory physical DMA buffer for a PCI cardIain Martinhttp://community.qnx.com/sf/go/post920782012-03-13T13:50:12Z2012-03-13T13:50:12ZThanks for your quick reply. Unfortunately, it also fails for me the first time I run it, when there is no physical memory associated with the shared memory object. I retested with a new memory object to confirm this.
As it works for you the first time, that suggests to me that the approach I'm taking is sensible?
I neglected to mention that I am using QNX 6.5.0.Iain Martin2012-03-13T13:50:12Zpost92076: RE: shm_ctl() fails when setting up a shared memory physical DMA
buffer for a PCI cardThomas Haupthttp://community.qnx.com/sf/go/post920762012-03-13T13:19:20Z2012-03-13T13:19:20ZHi Iain,
I can reproduce the problem - if the shared memory object already exists and has physical memory assigned to it.
When I run your code for the first time, it works perfectly. From then on, it will fail on shm_ctl. This kind of makes sense, since you're trying to associate physical memory with a shared memory object which already has physical memory associated with it. It's mostly the error code that is misleading.
Cheers,
Thomas
-----Original Message-----
From: Iain Martin [mailto:community-noreply@qnx.com]
Sent: Dienstag, 13. März 2012 13:54
To: ostech-core_os
Subject: shm_ctl() fails when setting up a shared memory physical DMA buffer for a PCI card
I am trying to set up a shared memory buffer for DMA, so I can DMA directly in/out from one process and memcpy in/out from other processes but shm_ctl() fails. I have been "doing the dance" with shm_open(), shm_ctl(), mmap() and mem_offset64() but not managed to combine these in a way that enables the call to shm_ctl to succeed with the physical flag set. There are other threads on this topic and I have followed their suggestions but they don't work for me. (for example: http://www.openqnx.com/newsgroups/viewtopic.php?f=13&t=12398) The "tested example" that thread works for me but it specifies the phyiscal address directly and does not obtain it from an mmap allocation followed by mem_offset64. As soon as I pass the mmap allocation physical address to shm_ctl(), it fails with "error: Function not implemented".
I'm testing on a 4 core x86 PC.
An extract from my code is:
/* Allocate contiguous memory for DMA buffer */
/* byte size is page aligned */
uint32_t * ptr = mmap(NULL, bytesize, PROT_READ | PROT_WRITE | PROT_NOCACHE, MAP_PHYS | MAP_ANON, NOFD, 0);
/* Get the physical addresss, note that mem_offset fails so I use mem_offset64 */ mem_offset64(ptr, NOFD, bytesize, &physical_addr_64, &contig_len
/* Create a shared memory object */
int fd = shm_open("/turnip", O_RDWR | O_CREAT, 0644);
/* Overlay the shared memory object to the physical memory address */ if (shm_ctl(fd, SHMCTL_GLOBAL|SHMCTL_PHYS, physical_addr_64, bytesize) == -1) {
perror("shm_open");
exit(EXIT_FAILURE);
}
If I replace physical_addr_64 with 0xa0000, shm_ctl() works but this seems too risky because I am allocating a large amount for memory for driver DMA buffers so I'm not happy just picking any physical address for a driver buffer.
If I just use mmap and memoffset_64 to have a DMA buffer in process memory space this works fine and if I create a shared memory objects, this also works fine. I have read conflicting accounts of using ltruncate to allocate the physical buffer but I couldn't get that to work either and Ithink I'm going round in circles now!
Any help or advice would be greatly appreciated. Is it possible to allocate a DMA buffer that can be shared between processes?
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post92072Thomas Haupt2012-03-13T13:19:20Zpost92072: shm_ctl() fails when setting up a shared memory physical DMA buffer for a PCI cardIain Martinhttp://community.qnx.com/sf/go/post920722012-03-13T12:53:51Z2012-03-13T12:53:51ZI am trying to set up a shared memory buffer for DMA, so I can DMA directly in/out from one process and memcpy in/out from other processes but shm_ctl() fails. I have been "doing the dance" with shm_open(), shm_ctl(), mmap() and mem_offset64() but not managed to combine these in a way that enables the call to shm_ctl to succeed with the physical flag set. There are other threads on this topic and I have followed their suggestions but they don't work for me. (for example: http://www.openqnx.com/newsgroups/viewtopic.php?f=13&t=12398) The "tested example" that thread works for me but it specifies the phyiscal address directly and does not obtain it from an mmap allocation followed by mem_offset64. As soon as I pass the mmap allocation physical address to shm_ctl(), it fails with "error: Function not implemented".
I'm testing on a 4 core x86 PC.
An extract from my code is:
/* Allocate contiguous memory for DMA buffer */
/* byte size is page aligned */
uint32_t * ptr = mmap(NULL, bytesize, PROT_READ | PROT_WRITE | PROT_NOCACHE, MAP_PHYS | MAP_ANON, NOFD, 0);
/* Get the physical addresss, note that mem_offset fails so I use mem_offset64 */
mem_offset64(ptr, NOFD, bytesize, &physical_addr_64, &contig_len
/* Create a shared memory object */
int fd = shm_open("/turnip", O_RDWR | O_CREAT, 0644);
/* Overlay the shared memory object to the physical memory address */
if (shm_ctl(fd, SHMCTL_GLOBAL|SHMCTL_PHYS, physical_addr_64, bytesize) == -1)
{
perror("shm_open");
exit(EXIT_FAILURE);
}
If I replace physical_addr_64 with 0xa0000, shm_ctl() works but this seems too risky because I am allocating a large amount for memory for driver DMA buffers so I'm not happy just picking any physical address for a driver buffer.
If I just use mmap and memoffset_64 to have a DMA buffer in process memory space this works fine and if I create a shared memory objects, this also works fine. I have read conflicting accounts of using ltruncate to allocate the physical buffer but I couldn't get that to work either and Ithink I'm going round in circles now!
Any help or advice would be greatly appreciated. Is it possible to allocate a DMA buffer that can be shared between processes?Iain Martin2012-03-13T12:53:51Zpost91976: Re: cpu_pte_split() problem in QNX procnto.Sunil Kitturhttp://community.qnx.com/sf/go/post919762012-03-08T14:50:07Z2012-03-08T14:50:07ZA crash in cpu_pte_manipulate typically means that an L2 table
is not mapped - the code checks whether there is a valid L1
entry for the address range, and if so, expects that there is
an L2 table allocated. The L2 tables are mapped within a sparse
4MB space where 4K of tables should be mapped for each 4MB area
that is covered by valid L1 entries. The code will crash if the
mapping in that region is not present.
What OS version and cpu target are you using?
Is this the first user address space that has been created?
Sunil.
On 12-03-08 5:59 AM, ravinder are wrote:
> Dear QNX-OSTech,
>
> We are working on ARM based platform. While the procnto starts running we are seeing a hard crash. Please check the below call stack.
> It is appearing like there is some problem while preparing a Page Table entry by making pte split, which was called by mmap().
> In our case we are trying to allocate 1560 bytes memory, for that it is trying to split a 10MB space and create pte entry . Please find the MMU entries below.
> From the trace messages Mmap() is trying to map the physical address paddr = 0x80C36000, to vaddr = 0x78000000.
> To allocate the physical address 0x80C36000 from the MMU table entries ,it is observed that the 10MB+ has to be split.
>
> we found similar issue at http://community.qnx.com/sf/go/projects.core_os/discussion.newcode.topc3141
>
> Please suggest /provide some solution.
>
> CallStack
>
> __hardcrash(asm)
>
> exception
> cpu_pte_split(
> vaddr = 0x78000000,
> data = 0xE8AFBBE0 = BUILDENV_qss+0x0E8AFBBDF -> (
> paddr = 0x80C36000,
> adp = 0xE8CDF49C = BUILDENV_qss+0x0E8CDF49B,
> start = 0x78000000,
> end = 0x78001FFF,
> split_end = 0x78001FFF,
> first = 0x78000000,
> prot = 0x0561,
> op = 0x81,
> special = 0x0,
> shmem_flags = 0x00030002))
> flags = 0x8
> r = 0x78000000
> va = 0x78000000
> asid = 0x2
> pte = 0xFFBF0780 = end+0x1B1E058 -> 0xC0C0C0C0
> ptp = 0xFFFF3E00 = end+0x1F216D8 -> 0xC0C0C0C0
>
> do_manipulation(
> manip = 0xE8AFBBE0 = BUILDENV_qss+0x0E8AFBBDF -> (
> data = (paddr = 0x80C36000, adp = 0xE8CDF49C = BUILDENV_qss+0x0E8CDF49B, start = 0x78000000, end =
> state = 0x0,
> mapped = 0x78000000))
>
> ker_manipulate(
> data = 0xE8AFBBE0 = BUILDENV_qss+0x0E8AFBBDF -> )
>
> ker_ring0(
> ?,
> ?)
>
>
> MMU page table
>
> _________address_____________|_physical____________________|sec|_d_|_size____|_permissions____________________|_glb|_shr|_pageflags_(
> C:0002:00000000--DFFFFFFF| | | | | | | |
> C:0002:E0000000--E8CFFFFF| A:00:80200000--88EFFFFF| ns| 00| 00100000| P:readwrite U:noaccess exec | yes| no | strongly or
> C:0002:E8D00000--FC3FFFFF| | | | | | | |
> C:0002:FC400000--FC403FFF| A:00:80CD4000--80CD7FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
> C:0002:FC404000--FC404FFF| A:00:80CDC000--80CDCFFF| ns| 00| 00001000| P:readwrite U:readonly exec | yes| no | strongly or
> C:0002:FC405000--FC405FFF| A:00:0209A000--0209AFFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
> C:0002:FC406000--FC408FFF| A:00:02000000--02002FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
> C:0002:FC409000--FC40BFFF| A:00:02000000--02002FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
> C:0002:FC40C000--FC40EFFF| A:00:02000000--02002FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
> C:0002:FC40F000--FC411FFF| A:00:02000000--02002FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
> C:0002:FC412000--FC413FFF| A:00:00800000--00801FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
> C:0002:FC414000--FC414FFF| A:00:2A03F000--2A03FFFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
> C:0002:FC415000--FC416FFF| A:00:00800000--00801FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
> C:0002:FC417000--FC417FFF| A:00:2A03F000--2A03FFFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
> C:0002:FC418000--FC418FFF| A:00:02000000--02000FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
> C:0002:FC419000--FC41AFFF| A:00:00800000--00801FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
> C:0002:FC41B000--FC41CFFF| A:00:00800000--00801FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
> C:0002:FC41D000--FC41DFFF| A:00:0208A000--0208AFFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
> C:0002:FC41E000--FC41EFFF| A:00:0208A000--0208AFFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
> C:0002:FC41F000--FC41FFFF| A:00:00200000--00200FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
> C:0002:FC420000--FC421FFF| A:00:2A03F000--2A040FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
> C:0002:FC422000--FC422FFF| A:00:00200000--00200FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
> C:0002:FC423000--FC424FFF| A:00:2A03F000--2A040FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
> C:0002:FC425000--FC425FFF| A:00:88EED000--88EEDFFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
> C:0002:FC426000--FDFFFFFF| | | | | | | |
> C:0002:FE000000--FE0FFFFF| A:00:80200000--802FFFFF| ns| 00| 00100000| P:readwrite U:noaccess exec | yes| no | strongly or
> ____C:0002:FE100000--FFBEFFFF|_____________________________|___|___|_________|________________________________|____|____|
> C:0002:FFBF0000--FFBF0FFF| A:00:88CF4000--88CF4FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| no | no | strongly or
> C:0002:FFBF1000--FFBF1FFF| A:00:80CD9000--80CD9FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
> C:0002:FFBF2000--FFBFDFFF| | | | | | | |
> C:0002:FFBFE000--FFBFEFFF| A:00:80CD8000--80CD8FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
> C:0002:FFBFF000--FFBFFFFF| A:00:80CDB000--80CDBFFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
> C:0002:FFC00000--FFFEFFFF| | | | | | | |
> C:0002:FFFF0000--FFFF0FFF| A:00:80CDA000--80CDAFFF| ns| 00| 00001000| P:readwrite U:noaccess exec | yes| no | strongly or
> C:0002:FFFF1000--FFFF1FFF| | | | | | | |
> C:0002:FFFF2000--FFFF3FFF| A:00:88ECA000--88ECBFFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| no | no | strongly or
> C:0002:FFFF4000--FFFFFFFF| | | | | | | |
>
>
> Thanks,
> Ravinder Are
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post91971
>Sunil Kittur2012-03-08T14:50:07Zpost91971: cpu_pte_split() problem in QNX procnto.ravinder arehttp://community.qnx.com/sf/go/post919712012-03-08T10:59:07Z2012-03-08T10:59:07ZDear QNX-OSTech,
We are working on ARM based platform. While the procnto starts running we are seeing a hard crash. Please check the below call stack.
It is appearing like there is some problem while preparing a Page Table entry by making pte split, which was called by mmap().
In our case we are trying to allocate 1560 bytes memory, for that it is trying to split a 10MB space and create pte entry . Please find the MMU entries below.
From the trace messages Mmap() is trying to map the physical address paddr = 0x80C36000, to vaddr = 0x78000000.
To allocate the physical address 0x80C36000 from the MMU table entries ,it is observed that the 10MB+ has to be split.
we found similar issue at http://community.qnx.com/sf/go/projects.core_os/discussion.newcode.topc3141
Please suggest /provide some solution.
CallStack
__hardcrash(asm)
exception
cpu_pte_split(
vaddr = 0x78000000,
data = 0xE8AFBBE0 = BUILDENV_qss+0x0E8AFBBDF -> (
paddr = 0x80C36000,
adp = 0xE8CDF49C = BUILDENV_qss+0x0E8CDF49B,
start = 0x78000000,
end = 0x78001FFF,
split_end = 0x78001FFF,
first = 0x78000000,
prot = 0x0561,
op = 0x81,
special = 0x0,
shmem_flags = 0x00030002))
flags = 0x8
r = 0x78000000
va = 0x78000000
asid = 0x2
pte = 0xFFBF0780 = end+0x1B1E058 -> 0xC0C0C0C0
ptp = 0xFFFF3E00 = end+0x1F216D8 -> 0xC0C0C0C0
do_manipulation(
manip = 0xE8AFBBE0 = BUILDENV_qss+0x0E8AFBBDF -> (
data = (paddr = 0x80C36000, adp = 0xE8CDF49C = BUILDENV_qss+0x0E8CDF49B, start = 0x78000000, end =
state = 0x0,
mapped = 0x78000000))
ker_manipulate(
data = 0xE8AFBBE0 = BUILDENV_qss+0x0E8AFBBDF -> )
ker_ring0(
?,
?)
MMU page table
_________address_____________|_physical____________________|sec|_d_|_size____|_permissions____________________|_glb|_shr|_pageflags_(
C:0002:00000000--DFFFFFFF| | | | | | | |
C:0002:E0000000--E8CFFFFF| A:00:80200000--88EFFFFF| ns| 00| 00100000| P:readwrite U:noaccess exec | yes| no | strongly or
C:0002:E8D00000--FC3FFFFF| | | | | | | |
C:0002:FC400000--FC403FFF| A:00:80CD4000--80CD7FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
C:0002:FC404000--FC404FFF| A:00:80CDC000--80CDCFFF| ns| 00| 00001000| P:readwrite U:readonly exec | yes| no | strongly or
C:0002:FC405000--FC405FFF| A:00:0209A000--0209AFFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
C:0002:FC406000--FC408FFF| A:00:02000000--02002FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
C:0002:FC409000--FC40BFFF| A:00:02000000--02002FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
C:0002:FC40C000--FC40EFFF| A:00:02000000--02002FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
C:0002:FC40F000--FC411FFF| A:00:02000000--02002FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
C:0002:FC412000--FC413FFF| A:00:00800000--00801FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
C:0002:FC414000--FC414FFF| A:00:2A03F000--2A03FFFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
C:0002:FC415000--FC416FFF| A:00:00800000--00801FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
C:0002:FC417000--FC417FFF| A:00:2A03F000--2A03FFFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
C:0002:FC418000--FC418FFF| A:00:02000000--02000FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
C:0002:FC419000--FC41AFFF| A:00:00800000--00801FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
C:0002:FC41B000--FC41CFFF| A:00:00800000--00801FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
C:0002:FC41D000--FC41DFFF| A:00:0208A000--0208AFFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
C:0002:FC41E000--FC41EFFF| A:00:0208A000--0208AFFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
C:0002:FC41F000--FC41FFFF| A:00:00200000--00200FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
C:0002:FC420000--FC421FFF| A:00:2A03F000--2A040FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
C:0002:FC422000--FC422FFF| A:00:00200000--00200FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
C:0002:FC423000--FC424FFF| A:00:2A03F000--2A040FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
C:0002:FC425000--FC425FFF| A:00:88EED000--88EEDFFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
C:0002:FC426000--FDFFFFFF| | | | | | | |
C:0002:FE000000--FE0FFFFF| A:00:80200000--802FFFFF| ns| 00| 00100000| P:readwrite U:noaccess exec | yes| no | strongly or
____C:0002:FE100000--FFBEFFFF|_____________________________|___|___|_________|________________________________|____|____|
C:0002:FFBF0000--FFBF0FFF| A:00:88CF4000--88CF4FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| no | no | strongly or
C:0002:FFBF1000--FFBF1FFF| A:00:80CD9000--80CD9FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
C:0002:FFBF2000--FFBFDFFF| | | | | | | |
C:0002:FFBFE000--FFBFEFFF| A:00:80CD8000--80CD8FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
C:0002:FFBFF000--FFBFFFFF| A:00:80CDB000--80CDBFFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or
C:0002:FFC00000--FFFEFFFF| | | | | | | |
C:0002:FFFF0000--FFFF0FFF| A:00:80CDA000--80CDAFFF| ns| 00| 00001000| P:readwrite U:noaccess exec | yes| no | strongly or
C:0002:FFFF1000--FFFF1FFF| | | | | | | |
C:0002:FFFF2000--FFFF3FFF| A:00:88ECA000--88ECBFFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| no | no | strongly or
C:0002:FFFF4000--FFFFFFFF| | | | | | | |
Thanks,
Ravinder Areravinder are2012-03-08T10:59:07Zpost91913: Crash in IP stackChristian Scheuchhttp://community.qnx.com/sf/go/post919132012-03-06T04:22:57Z2012-03-06T04:22:57ZHi,
We are encountering error while accessing /dev/io-net/ip0. Errno indicates "No such file or directory". Pls. indicate its probable cause and solution.
regards,Christian Scheuch2012-03-06T04:22:57Zpost91776: Re: Kernel trace : setup static filters to trace only specific processesKonstantin Vhttp://community.qnx.com/sf/go/post917762012-02-24T17:41:48Z2012-02-24T17:41:48ZHello Colin,
It`s quite a pity.
Anyway, now it is clear, thank you!Konstantin V2012-02-24T17:41:48Zpost91768: Re: Kernel trace : dynamic filtering : event handler restrictionsColin Burgesshttp://community.qnx.com/sf/go/post917682012-02-24T13:18:01Z2012-02-24T13:18:01ZIt's essentially the same as an interrupt handler - your entire address
space is mapped, but you are limited in stack usage
and can't make any kernel calls.
On 12-02-24 5:59 AM, Konstantin V wrote:
> Hello QNX Developers,
>
> As I understand from docs, I can attach event handling routine via TraceEvent (_NTO_TRACE_ADDEVENTHANDLER, ...) and it will be called by the kernel directly.
>
> 1) What are the stack restrictions ?
>
> 2) How much of process address space is mapped ?
> Can I affect it in any way ?
> Example code from QNX documentation accesses process global variable, so I assume that at least
> some part of process address space is mapped.
> In case of complete address space is mapped, then may be it makes
> sense to keep the size of the executable implementing dynamic kernel event filtering
> as small as possible...
>
> Thank you!
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post91764
>
--
cburgess@qnx.comColin Burgess2012-02-24T13:18:01Zpost91767: Re: Kernel trace : setup static filters to trace only specific processesColin Burgesshttp://community.qnx.com/sf/go/post917672012-02-24T13:17:11Z2012-02-24T13:17:11ZHi Konstantin,
You will have to use dynamic filtering, the static pid filter is limited
to one pid.
On 12-02-24 5:23 AM, Konstantin V wrote:
> Hello QNX Developers,
>
> I need to setup kernel trace filters so only communication messages emitted by specific processes are recorded. I followed QNX documentation and wrote little helper util, but eventually tracing is performed only for the last process specified.
>
> The core functionality of this util is based on following TraceEvent() call :
> TraceEvent(_NTO_TRACE_SETCLASSPID, int class, pid_t pid)
>
> Usecase
>
> 1) Execute tracelogger : tracelogger -d1 -s 10 -f trace_mcd_`date -t`.kev
> 2) In another console, get required process ids : pidin -f "aA" | grep -i -E "eide|mcd|any_other"
> 3) Start tracing : ./mcd_event_filter 1 2 3
>
> Note that in case of tracelogger is not running, setting filters will (legally) fail : ./mcd_event_filter: line:109 function call TraceEvent() failed, errno(47): Operation canceled
>
> Expected results :
> - kernel trace for communication messages (and other trace classes) caused by all these processes is enabled
>
> Current behavior :
> - kernel trace only for the last (!) PID specified is available
>
> Could you please point me what`s wrong with this idea/util ?
>
> Is it possible to implement such filter without resorting to dynamic filtering ?
>
> See attached source for the mentioned code.
>
> Thank you!
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post91763
--
cburgess@qnx.comColin Burgess2012-02-24T13:17:11Zpost91764: Kernel trace : dynamic filtering : event handler restrictionsKonstantin Vhttp://community.qnx.com/sf/go/post917642012-02-24T10:59:10Z2012-02-24T10:59:10ZHello QNX Developers,
As I understand from docs, I can attach event handling routine via TraceEvent (_NTO_TRACE_ADDEVENTHANDLER, ...) and it will be called by the kernel directly.
1) What are the stack restrictions ?
2) How much of process address space is mapped ?
Can I affect it in any way ?
Example code from QNX documentation accesses process global variable, so I assume that at least
some part of process address space is mapped.
In case of complete address space is mapped, then may be it makes
sense to keep the size of the executable implementing dynamic kernel event filtering
as small as possible...
Thank you!Konstantin V2012-02-24T10:59:10Zpost91763: Kernel trace : setup static filters to trace only specific processesKonstantin Vhttp://community.qnx.com/sf/go/post917632012-02-24T10:23:23Z2012-02-24T10:23:23ZHello QNX Developers,
I need to setup kernel trace filters so only communication messages emitted by specific processes are recorded. I followed QNX documentation and wrote little helper util, but eventually tracing is performed only for the last process specified.
The core functionality of this util is based on following TraceEvent() call :
TraceEvent(_NTO_TRACE_SETCLASSPID, int class, pid_t pid)
Usecase
1) Execute tracelogger : tracelogger -d1 -s 10 -f trace_mcd_`date -t`.kev
2) In another console, get required process ids : pidin -f "aA" | grep -i -E "eide|mcd|any_other"
3) Start tracing : ./mcd_event_filter 1 2 3
Note that in case of tracelogger is not running, setting filters will (legally) fail : ./mcd_event_filter: line:109 function call TraceEvent() failed, errno(47): Operation canceled
Expected results :
- kernel trace for communication messages (and other trace classes) caused by all these processes is enabled
Current behavior :
- kernel trace only for the last (!) PID specified is available
Could you please point me what`s wrong with this idea/util ?
Is it possible to implement such filter without resorting to dynamic filtering ?
See attached source for the mentioned code.
Thank you!Konstantin V2012-02-24T10:23:23Zpost91696: Disc cache get inefficient while usedOleh Derevenkohttp://community.qnx.com/sf/go/post916962012-02-21T22:30:41Z2012-02-21T22:30:41ZHi,
I've noticed that disc caches get inefficient when used for longer time. I see this when I compile my project (~1000 cpp files, build folders with all the compiled objects and binaries > 2.6 Gb). If I build right after computer reboot the build completes much faster. However if computer had been used for some time the build can take twice as long and even more.
Having experimented a little I've found that the main bottleneck is the includes search/loading during compilation. Nothing helped except for increasing disk caches size. Currently my system runs with "blk cache=1792m,mfu=33,vnode=10240" on 4Gb RAM quad-core machine. If files are compiled soon after reboot the disc activity heared is minimal. However if project is built after some use (even if build folder with project files and compiled objects are just deleted and unpacked once again) the disc activity on next build gets much higher for each file and pauses between files get noticeably longer.
So something is definitelty wrong with disc caching algorithms you implemented for 650.Oleh Derevenko2012-02-21T22:30:41Zpost91626: Display resolution is out of rangeMustafa Can Kayahttp://community.qnx.com/sf/go/post916262012-02-16T02:21:36Z2012-02-16T02:21:36ZHi,
I compiled and flashed QNX image to my board. When i started it, display says "out of range". Its about resolution problem. So, i need to change resolution datas over terminal, because no have woking screen. About that, how can i do it, could you help me about that?
Note: Terminal screenshot added to attachment (need to edit xres and yres).
Thanks,
Mr. CanMustafa Can Kaya2012-02-16T02:21:36Zpost91561: Re: Try to install qnxsdp-6.5.0-201007091524-dvd.iso, but fail. The error code is at belowHuiHsien Wuhttp://community.qnx.com/sf/go/post915612012-02-14T14:54:01Z2012-02-14T14:54:01ZFinal solution:
1. Install qnxsdp-6.4.0-200810211530-dvd okay.
Give up the version of 6.5.0.HuiHsien Wu2012-02-14T14:54:01Zpost91546: Re: MTU configuration on IPStackChristian Scheuchhttp://community.qnx.com/sf/go/post915462012-02-14T09:17:04Z2012-02-14T09:17:04ZHere are the details of ifconfig
ifconfig
lo0: flags=8009<UP,LOOPBACK,MULTICAST> mtu 33212
capabilities=7<IP4CSUM,TCP4CSUM,UDP4CSUM>
enabled=0<>
inet 127.0.0.1 netmask 0xff000000
en0: flags=843<UP,BROADCAST,RUNNING,SIMPLEX> mtu 1500
address: 00:40:43:15:1a:30
inet 192.168.255.126 netmask 0xffff0000 broadcast 192.168.255.255
en1: flags=843<UP,BROADCAST,RUNNING,SIMPLEX> mtu 1504
address: 10:71:61:03:38:00
inet 172.18.4.244 netmask 0xffffff00 broadcast 172.18.4.255
en2: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
address: 1e:42:86:27:01:08
inet 192.168.255.126 netmask 0xffff0000 broadcast 192.168.255.255
inet alias 192.168.255.125 netmask 0xffffff80 broadcast 192.168.255.127
vlan4095: flags=843<UP,BROADCAST,RUNNING,SIMPLEX> mtu 1500
vlan: 4095 parent: en0
address: 00:40:43:15:1a:30
vlan799: flags=843<UP,BROADCAST,RUNNING,SIMPLEX> mtu 1500
vlan: 799 parent: en0
address: 00:40:43:15:1a:30
inet 10.10.10.12 netmask 0xffffff00 broadcast 10.10.10.255Christian Scheuch2012-02-14T09:17:04Zpost91545: MTU configuration on IPStackChristian Scheuchhttp://community.qnx.com/sf/go/post915452012-02-14T09:13:59Z2012-02-14T09:13:59ZHi,
We have configured
MTU 1504 on en0 and
MTU 1500 on en1
But we have observed that during Ftp negotiations 1464 is advertised.
Incase MTU 1500 is configured both on en0 and en1, 1460 is advertised.
[Packet summary from wireshark]
13 14:35:28.886466 172.18.4.118 172.18.4.244 TCP cisco-ipsla > ftp [SYN] Seq=0 Win=65535 Len=0 MSS=1460
14 14:35:28.887697 172.18.4.244 172.18.4.118 TCP ftp > cisco-ipsla [SYN, ACK] Seq=0 Ack=1 Win=16384 Len=0 MSS=1464
where 172.18.4.244 is the IP for the site running on QNX
Pls. let us know what is the probable cause.
regards,Christian Scheuch2012-02-14T09:13:59Zpost91462: Re: Problems of Neutrino installation on PC/104HuiHsien Wuhttp://community.qnx.com/sf/go/post914622012-02-10T04:29:55Z2012-02-10T04:29:55ZI got the same issue.
Does anyone can help us?HuiHsien Wu2012-02-10T04:29:55Zpost91458: Try to install qnxsdp-6.5.0-201007091524-dvd.iso, but fail. The error code is at belowHuiHsien Wuhttp://community.qnx.com/sf/go/post914582012-02-10T03:31:09Z2012-02-10T03:31:09ZTry to install qnxsdp-6.5.0-201007091524-dvd.iso via a CD disk.
After booting.
The status is at below.
Booting QNX SDP
Press the space bar to input Boot options or D to disable DMA.
Trying SATA achi. Scanning for devices.
Found 1 device.
Trying EIDE. Scanning for devices.
xpt_configure:No eide interfaces found.
Trying SATA mvSata. Scanning for devices.
xpt_configure:No mvSata interfaces found.
Would you like to apply a driver update disk?
After that, I don't know how to install a QNX neutrino RTOS as a target operating system.
Does anyone know how to solve the issue?
Thanks your attention.HuiHsien Wu2012-02-10T03:31:09Zpost91323: Re: sem_xxxx APIsMate Szarvashttp://community.qnx.com/sf/go/post913232012-02-03T02:28:03Z2012-02-03T02:28:03ZYou can get an accurate answer regarding the CPU use implication by profiling a test application using the system profiler.
sem_open() will have the largest overhead: you will want to avoid open()/closing() the same resource in a loop.
--
Mate
From: Lawrence Lee <community-noreply@qnx.com<mailto:community-noreply@qnx.com>>
Reply-To: <post91301@community.qnx.com<mailto:post91301@community.qnx.com>>
Date: Thu, 2 Feb 2012 10:46:22 -0500
To: ostech-core_os <post91301@community.qnx.com<mailto:post91301@community.qnx.com>>
Subject: sem_xxxx APIs
QNX implemented POSIX APIs, but how does sem_xxxx APIs got implemented.
Does sem_xxxx routines actually send message to a "semaphore resource manager"? How expansive if it is sending messages all the time, if an application
calling sem_open, follow by sem_wait, follow by sem_post, and then sem_close all the time.
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post91301Mate Szarvas2012-02-03T02:28:03Zpost91301: sem_xxxx APIsLawrence Leehttp://community.qnx.com/sf/go/post913012012-02-02T15:46:21Z2012-02-02T15:46:21ZQNX implemented POSIX APIs, but how does sem_xxxx APIs got implemented.
Does sem_xxxx routines actually send message to a "semaphore resource manager"? How expansive if it is sending messages all the time, if an application
calling sem_open, follow by sem_wait, follow by sem_post, and then sem_close all the time.Lawrence Lee2012-02-02T15:46:21Zpost91272: Re: Adobe Air libcore.so loaderXiongwei Huanghttp://community.qnx.com/sf/go/post912722012-02-01T03:11:16Z2012-02-01T03:11:16ZHi roger
thanks for reply
what we want is dlopen() and dlsym() with lazy load at start , but the ldd result of libCore.so with about 30 library files linked .
I think this will get the libCore.so load a little slow when first start . if you can get the library not linked direct to the libCore.so , I think it should start fajavascript:if (validateCreatePost(document.createPost)) { submitForm(document.createPost, 'submit'); } else { void(0) }ster
thanksXiongwei Huang2012-02-01T03:11:16Zpost91271: Re: Adobe Air libcore.so loaderRoger Macleanhttp://community.qnx.com/sf/go/post912712012-02-01T02:56:32Z2012-02-01T02:56:32ZLoad what with dlopen? If you refer to libCore.so, libCore.so is AIR (and
is dlopened).
On 12-01-31 9:43 PM, "Xiongwei Huang" <community-noreply@qnx.com> wrote:
>Hi all
>
>we are working on flash air , and seem adl start with a little slow than
>what we expect
>
>and we notice the libcore.so linked with lots of library in elf header ,
>as I think , maybe you can load it with dlopen() and this will speed up
>the start time .
>
>can you modify your code ? this will be helpful for all your flash air
>based product .
>thanks and regardsRoger Maclean2012-02-01T02:56:32Zpost91270: Adobe Air libcore.so loaderXiongwei Huanghttp://community.qnx.com/sf/go/post912702012-02-01T02:43:36Z2012-02-01T02:43:36ZHi all
we are working on flash air , and seem adl start with a little slow than what we expect
and we notice the libcore.so linked with lots of library in elf header , as I think , maybe you can load it with dlopen() and this will speed up the start time .
can you modify your code ? this will be helpful for all your flash air based product .
thanks and regardsXiongwei Huang2012-02-01T02:43:36Zpost91212: OLSR portingRiccardo Maciocehttp://community.qnx.com/sf/go/post912122012-01-27T16:50:09Z2012-01-27T16:50:09ZHello everyone,
I'm trying to port the implementation of the OSLR protocol to the QNX OS. I'm a newbie in QNX and in porting applications. Do you have any hint on the best way to proceed?
ThanksRiccardo Macioce2012-01-27T16:50:09Zpost91160: Does qnx have prelink tools ?Xiongwei Huanghttp://community.qnx.com/sf/go/post911602012-01-26T08:29:10Z2012-01-26T08:29:10ZHi all
I have searched google and QNX doc , and I no result about prelink implement in QNX
The prelink was very useful for fast boot and common used in linux/android enviroment .
from link and loader side , I think this is no difference from qnx and linux .
Does anyone try to porting this ? or where can I get it ?
and this is about 6 years ago tools ,
http://people.redhat.com/jakub/prelink.pdf
is there copyright issure or some other problem porting this to qnx ?
i really think its useful for fast bootXiongwei Huang2012-01-26T08:29:10Zpost91141: Re: InterruptAttach questionRobert Murrellhttp://community.qnx.com/sf/go/post911412012-01-25T17:42:41Z2012-01-25T17:42:41ZOK. So the definitive statement is for QNX running under the ISA architecture, the PCI interrupts are level-sensitive and the ISA interrupts are edge-sensitive.Robert Murrell2012-01-25T17:42:41Zpost91138: Re: InterruptAttach questionArmin Steinhoffhttp://community.qnx.com/sf/go/post911382012-01-25T16:19:10Z2012-01-25T16:19:10ZRobert Murrell wrote:
> Well, now on testing, InterruptAttach is returning a unique ID. So for now, I'm going to assume what I had seen yesterday was the result of a short between the headsets. However, thank you for confirming that the ISA IRQs are level-sensitive under QNX
No ... the ISA interrupt is edge sensitive and this behavior has been
defined by ISA archttecture. Level sensitive is the PCI interrupt as
defined by the PCI standard.
--Armin
> so the next guy doesn't have to guess. I am seeing some oddities with this interrupt scheme, but I will make separate posts if I have more questions.
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post91133
>
>Armin Steinhoff2012-01-25T16:19:10Zpost91133: Re: RE: InterruptAttach questionRobert Murrellhttp://community.qnx.com/sf/go/post911332012-01-25T15:28:49Z2012-01-25T15:28:49ZWell, now on testing, InterruptAttach is returning a unique ID. So for now, I'm going to assume what I had seen yesterday was the result of a short between the headsets. However, thank you for confirming that the ISA IRQs are level-sensitive under QNX so the next guy doesn't have to guess. I am seeing some oddities with this interrupt scheme, but I will make separate posts if I have more questions.Robert Murrell2012-01-25T15:28:49Zpost91128: RE: InterruptAttach questionThomas Haupthttp://community.qnx.com/sf/go/post911282012-01-25T14:32:13Z2012-01-25T14:32:13ZHi Robert,
level-sensitive should be correct. Identical interrupt ids would not be expected; are you sure they aren't -1, or your threads terminated right after attaching their interrupt handlers ?
Perhaps you'd care to post your test-case and sample output?
Cheers,
Thomas
-----Original Message-----
From: Robert Murrell [mailto:community-noreply@qnx.com]
Sent: Mittwoch, 25. Januar 2012 15:11
To: ostech-core_os
Subject: InterruptAttach question
I'm trying to share an interrupt between two devices on an x86 system with a vanilla PC architecture. There are political reasons that I have to either get it working or prove it won't work other than "Its a bad idea". Each device has its own interrupt handler and process thread.
On initialization each thread calls InterruptAttach on the same IRQ line. Both calls to InterruptAttach return the same value. Is this normal behavior?
Also, I have been assuming that QNX configures the 8259 PIC with level-sensitive interrupts like DOS and Windows. Is this a correct assumption?
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post91127Thomas Haupt2012-01-25T14:32:13Zpost91127: InterruptAttach questionRobert Murrellhttp://community.qnx.com/sf/go/post911272012-01-25T14:10:53Z2012-01-25T14:10:53ZI'm trying to share an interrupt between two devices on an x86 system with a vanilla PC architecture. There are political reasons that I have to either get it working or prove it won't work other than "Its a bad idea". Each device has its own interrupt handler and process thread.
On initialization each thread calls InterruptAttach on the same IRQ line. Both calls to InterruptAttach return the same value. Is this normal behavior?
Also, I have been assuming that QNX configures the 8259 PIC with level-sensitive interrupts like DOS and Windows. Is this a correct assumption?Robert Murrell2012-01-25T14:10:53Zpost91090: Which is the timer interrupt on x86 6.4.0 IRQ 0/1 ?Subodh Harmalkarhttp://community.qnx.com/sf/go/post910902012-01-24T00:21:37Z2012-01-24T00:21:37ZIf I do "pidin irqs" the handlers that I see connected to procnto-smp-instr show following:
irq 0: seems to be a no-op
irq 1: seems like a handler.
Are QNX IRQs not directly mapped to x86 IRQs?
My board has Pentium M and 6300ESB chipset. Does QNX use APIC or PIC to generate timer interrupt?
I have captured a rare hang in JTAG connected system. It seems like no interrupts are coming in. Every time I stop in JTAG, the processor seems to stop at a HLT instruction in kernel with interrupts enabled around F0050216.
If this is not the right forum, then please let me know where I can get better help.
Thanks.Subodh Harmalkar2012-01-24T00:21:37Zpost91067: Re: OS/micro-kernel Hangs??Subodh Harmalkarhttp://community.qnx.com/sf/go/post910672012-01-22T16:19:48Z2012-01-22T16:19:48ZHas any one else seen OS (QNX 6.4.0) hanging at either of these two:
0xF0050216 that follows after a HLT with IF enabled? Implying idle task is running while hi-pri tasks are starved?
0xFED13AF8 that follows after CLI then HLT? Implying some sort of panic? Our startup-bios was not started with -A option.
Any ideas about what I should look into?
Our application runs on a Pentium M / PC architecture board in a chassis populated with other PCI cards. It runs well most of the time. Once in 5-20 days OS hangs. I am suspecting spurious interrupts, but that's just a suspicion. I have a JTAG put on two boards. Not able to isolate suspect code yet. That's why I am looking for ideas.
Thanks a bunch.Subodh Harmalkar2012-01-22T16:19:48Zpost91052: OS/micro-kernel Hangs??Subodh Harmalkarhttp://community.qnx.com/sf/go/post910522012-01-20T16:43:19Z2012-01-20T16:43:19ZI am struggling (rather gasping :-) at a problem where OS seems to hang completely.
So far, I have seen two different behaviors:
One where Interrupt flag was disabled and HLT was executed. See, Jan-19-2012.bmp.
Another where Interrupt flag was enabled and HLT was executed. See, tb1-hang-no-access.bmp
In both cases, system did not respond to ssh/keyboard/mouse. We are using procnto-smp-instr. I don't have access to source code. We are running 6.4.0.
tb1-hang-no-access seems like a situation where IDLE task was running.
Jan-19-2012 seems like a Blue Screen of Death / Out of Interrupt event.
Any one can confirm and give suggestions on how to debug this further?
I have a JTAG connected to the system that shows Jan-20-2012.bmp
Please help. It seems like a case of spurious interrupt. I want to know how can I determine which interrupt is causing this.
Thanks a bunch.Subodh Harmalkar2012-01-20T16:43:19Zpost91037: Is physical address required in x86 version of CACHE_FLUSH?Chip Bagwellhttp://community.qnx.com/sf/go/post910372012-01-19T20:56:25Z2012-01-19T20:56:25ZHello,
In the x86 implementation of the CACHE_FLUSH and CACHE_INVAL macros (which are really pointers to the cache_ctrl.cf->flush() and cache_ctrl.cf->invalidate() functions, is the real physical address of the memory you are trying to work on required?
I ask because our existing architecture, PPC, doesn't use the function pointers above but use PPC specific functions, which do not appear to use the physical address. As such, my code has the physical address set to NULL to avoid the unnecessary call to mem_offset().
Thanks
Chip BagwellChip Bagwell2012-01-19T20:56:25Zpost91015: Re: syslogd not workingSean Boudreauhttp://community.qnx.com/sf/go/post910152012-01-19T16:22:36Z2012-01-19T16:22:36ZMake sure the file exists before syslogd is started.
On Thu, Jan 19, 2012 at 11:19:06AM -0500, Paul Boyle wrote:
>
> This works:
> "*.* /var/log/syslog"
>
> This doesn't work
> "*.* /var/log/sysLog"
>
>
> I.e, a capatilization of the letter 'l'. There no write permissions issue. I can touch "/var/log/AnyThingIWant"
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post91014
>Sean Boudreau2012-01-19T16:22:36Zpost91014: Re: syslogd not workingPaul Boylehttp://community.qnx.com/sf/go/post910142012-01-19T16:19:04Z2012-01-19T16:19:04ZThis works:
"*.* /var/log/syslog"
This doesn't work
"*.* /var/log/sysLog"
I.e, a capatilization of the letter 'l'. There no write permissions issue. I can touch "/var/log/AnyThingIWant"Paul Boyle2012-01-19T16:19:04Zpost91013: Re: syslogd not workingSean Boudreauhttp://community.qnx.com/sf/go/post910132012-01-19T16:16:01Z2012-01-19T16:16:01ZBe careful of whitespace and line endings (no CRLF).
-seanb
On Thu, Jan 19, 2012 at 10:53:35AM -0500, Paul Boyle wrote:
>
> syslog is not working properly on 6.4.1
>
> By default I have the following config file contents:
> ------------------------------------------------------------
> # cat /etc/syslog.conf
> # The file must exist for logging to occur!!
> mail.* /var/log/maillog
> *.* /var/log/syslog
> -------------------------------------------------------------
>
> If I modify this in anyway, the logging doesn't work. If the log file path is modified, logs don't appear. If the config file doesn't exist, logs don't appear. If I add extra logging files, logs don't appear. If I add remote logging, logs don't get exported over the net.
>
> Any ideas?
>
> Paul
>
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post91012
>Sean Boudreau2012-01-19T16:16:01Zpost91012: syslogd not workingPaul Boylehttp://community.qnx.com/sf/go/post910122012-01-19T15:53:33Z2012-01-19T15:53:33Zsyslog is not working properly on 6.4.1
By default I have the following config file contents:
------------------------------------------------------------
# cat /etc/syslog.conf
# The file must exist for logging to occur!!
mail.* /var/log/maillog
*.* /var/log/syslog
-------------------------------------------------------------
If I modify this in anyway, the logging doesn't work. If the log file path is modified, logs don't appear. If the config file doesn't exist, logs don't appear. If I add extra logging files, logs don't appear. If I add remote logging, logs don't get exported over the net.
Any ideas?
PaulPaul Boyle2012-01-19T15:53:33Zpost90926: Re: message from driver to appSteven Dufresnehttp://community.qnx.com/sf/go/post909262012-01-12T23:44:27Z2012-01-12T23:44:27ZYou're welcome, Hung.
-Steven D.Steven Dufresne2012-01-12T23:44:27Zpost90925: Re: message from driver to appHung Tranhttp://community.qnx.com/sf/go/post909252012-01-12T22:43:20Z2012-01-12T22:43:20ZThanks, Steven. I followed your advice and call ConnectAttach() in the driver. It works.
Thanks again for responding,
hungHung Tran2012-01-12T22:43:20Zpost90848: Re: Wrong size returned by readdir for /procOleh Derevenkohttp://community.qnx.com/sf/go/post908482012-01-05T10:53:43Z2012-01-05T10:53:43Z> Hi,
>
> In QNX650, while calling readdir() for root folder, for "proc" entry dirent::
> d_namelen comes with value of 6, while normally it would have to be 5 (the
> length + zero terminator).
> While being easy to work around, it's still unpleasant to have to be doing
> strlen() for every directory entry and re-validating everything because of
> this bug.
Well, a little correction:
d_namelen comes with value of 5, while normally it would have to be 4Oleh Derevenko2012-01-05T10:53:43Zpost90847: Wrong size returned by readdir for /procOleh Derevenkohttp://community.qnx.com/sf/go/post908472012-01-05T10:42:24Z2012-01-05T10:42:24ZHi,
In QNX650, while calling readdir() for root folder, for "proc" entry dirent::d_namelen comes with value of 6, while normally it would have to be 5 (the length + zero terminator).
While being easy to work around, it's still unpleasant to have to be doing strlen() for every directory entry and re-validating everything because of this bug.Oleh Derevenko2012-01-05T10:42:24Z