#linuxcnc-devel | Logs for 2013-08-26

[17:42:17] <PCW> bit length is a 6 bit regsister
[17:42:47] <andypugh> Ok, so up to 64 bits.
[17:43:01] <andypugh> Does that typically include multiple turns?
[17:43:08] <micges> hi guys
[17:43:25] <cradek> hi micges
[17:43:32] <andypugh> Good morning micges
[17:43:37] <PCW> Also there may be status bits so the extracted fields need to be explicitly specified
[17:43:48] <cradek> did you have any luck finding the ja3 wheel jog code that was lost?
[17:44:18] <andypugh> PCW: That sounds painful. I need more clues in that case (but not tonight)
[17:44:20] <micges> no, it's losy
[17:44:22] <micges> lost
[17:44:55] <andypugh> I have learned to not get upset when I lose code, it generally ends up as better code when I recrreate it.
[17:45:14] <cradek> micges: thanks for trying
[17:47:01] <micges> CaptHindsight: hi
[17:47:39] <PCW> yeah you know more the second time, (unless you are old like me and you know less)
[17:48:18] <micges> andypugh: same here, it was just not easy code
[17:48:23] <andypugh> Well, that's a surprise. Git format-patch just created a patch called0001-http-3.bp.blogspot.com-_k0B_dQ8jnXE-Sn8-qoWjUnI-AAAA.patch
[17:49:03] <andypugh> (I do hope that isn't porn)
[17:49:28] <micges> memleak: around?
[17:49:41] <micges> about 7i80 under rtai:
[17:50:15] <cradek> andypugh: perhaps check your log messages...
[17:50:16] <micges> if anyone know how to make this code works under rtai?
[17:50:17] <micges> + ret = rt_task_create(&rt_probe_task, "probe", 0, 10, T_JOINABLE);
[17:50:17] <micges> + rt_task_start(&rt_probe_task, hm2_eth_probe, NULL);
[17:50:17] <micges> + rt_task_join(&rt_probe_task);
[17:52:06] <andypugh> Ah, I see what happened. I Command-Ved to the bottom of the commit message (which pasted a URL in to the commit) when I meant to Ctrl-V to the bottom.
[17:52:34] <micges> as for me there is no T_JOINABLE flag in rtai
[18:38:52] <memleak> and I just got back..
[18:41:46] <memleak> RTAI uses rt_task_join although i'm not sure if it's identical to T_JOINABLE
[18:42:10] * memleak does not know where T_JOINABLE is defined
[18:45:23] <memleak> ah it's in the tasking code.. T_JOINABLE implies rt_task_join
[18:46:21] <memleak> T_JOINABLE lets a task wait on the termination of another task, rt_task_join cleans up allocated resources after the task's termination it seems.
[18:47:21] <memleak> if he comes back and i'm not here just send him that ^
[18:47:56] <micges> memleak: above code is from 7i80 driver under xenomai
[18:47:56] <memleak> heh! the timing! seconds later
[18:48:31] <micges> I've been waiting while I'll remember :)
[18:48:43] <memleak> logger[psha], link
[18:48:43] <logger[psha]> memleak: Log stored at http://psha.org.ru/irc/%23linuxcnc-devel/2013-08-26.html
[18:49:12] <memleak> micges: scroll to the bottom of that link
[18:49:17] <micges> above code doesn't want to work under rtai
[18:49:31] <micges> (yes I saw log)
[18:50:03] <memleak> what's the compilation error? T_JOINABLE undeclared?
[18:50:43] <micges> yes
[18:52:18] <micges> it was half year ago
[18:54:30] <memleak> i'd try removig T_JOINABLE first and see if that functions properly considering it isn't defined in RTAI
[18:55:30] <memleak> if it causes issues I'd try replacing T_JOINABLE to rt_task_wait
[18:56:05] <micges> it waits for what?
[18:56:47] <memleak> it suspends the task until the next task
[18:57:03] <micges> nope
[18:57:27] <micges> let me describe problem
[18:58:13] <micges> I init hm2_eth driver in normal kernel mode without rt, like all hal drivers
[18:58:52] <micges> then I must communicate with 7i80 by rtnet in kernel mode rt
[18:59:12] <memleak> i understand that part
[19:00:21] <micges> which takes many servo-thread cycles, so I can't do that in first call of hooked hal functions
[19:01:04] <micges> servo-thread calls will overlap
[19:01:41] <memleak> Perhaps try using a function listed here instead: https://www.rtai.org/documentation/magma/html/api/api_8c.html
[19:02:18] <micges> so it must be done with another rt task which is created in init code and also result from comm with board is tested in hm2_eth init code
[19:02:40] <memleak> rt_task_yield maybe?
[19:03:21] <memleak> I'd read over that page and see which function would best suite the situation.
[19:03:36] <micges> I did it several times
[19:04:12] <micges> only task_join which works in xenomai works
[19:05:07] <micges> there is no rt_task_join in that page
[19:05:14] <memleak> task_join works in RTAI..
[19:05:42] <memleak> does it not..?
[19:06:48] <micges> it should
[19:08:53] <memleak> what happens with rt_task_join ?
[19:09:27] <micges> dead lock
[19:10:11] <micges> like T_JOINABLE wasn't respected
[19:10:42] <memleak> where is the xenomai source code for T_JOINABLE?
[19:11:00] <memleak> i'll see if I can just integrate that into RTAI and boom
[19:12:46] <micges> it would be very cool
[19:12:57] <micges> memleak: pm
[19:13:14] <memleak> great, it's XNTHREAD_SPARE1.. that helps me a lot..
[19:13:22] <memleak> XN for Xenomai.. no..
[19:15:06] <memleak> I have no idea...
[19:15:44] <memleak> try the RTAI mailing list.
[19:16:25] <micges> memleak: where is definition of rt_task_join in rtai source?
[19:16:39] <micges> ok, Ill try
[19:16:54] <memleak> git grep "rt_task_join"
[19:17:32] <memleak> if using the shabbyx rtai repo
[19:17:54] <memleak> i'm not using linux right now so i can't look it up
[19:18:41] <memleak> i'd use rt_task_suspend then just use rt_task_resume
[19:19:42] <micges> it will work when you know how long that task will take
[19:20:03] <micges> heh I;m also not on linux
[19:20:05] <memleak> so figure out the needed time?
[19:20:23] <micges> can't
[19:20:26] <memleak> that way you cann use rt_sleep_until if those don't work
[19:20:38] <memleak> i'm just throwing random functions out there, i have no idea.
[19:20:53] <memleak> and why can't you calculate the time needed?
[19:21:24] <micges> it's board detection and checking code
[19:22:02] <memleak> and rt_task_yield doesn't work because..?
[19:23:34] <micges> becouse its behaviour is based on cyclic rt code
[19:23:58] <micges> I have one rt function last many rt cycles
[19:24:24] <memleak> mhaberler might be able to help but he's not in channel right now, when he is, ping him
[19:25:11] <micges> thanks anyway, I'll get into task_join under rtai and narrow which part is missing/wrong and ping you
[19:25:15] <memleak> explain the issue to the RTAI mailing list
[19:25:24] <memleak> as well^
[19:25:43] <memleak> yeah it shouldn't dead lock..
[19:25:53] <memleak> that's not normal or expected
[19:26:01] <micges> will do
[19:26:40] <micges> thanks and see you
[19:27:03] <memleak> take care! sorry i cant be of much help..