Re: general i/o question

2008-05-08 Thread rmgls
On Wed, 7 May 2008 14:40:57 Jeremy Chadwick [EMAIL PROTECTED] wrote: On Wed, May 07, 2008 at 05:39:00PM +0200, [EMAIL PROTECTED] wrote: i need to test (NOWAIT), the presence of keypressed/depressed on a terminal and then read the scan code, like for a piano pc keyboard. my questions

binary file within a shell script

2008-05-08 Thread Mathieu Prevot
Hi there, I would like to use one exec file from a shellscript but I would like it to be incorporated in the same file, like Nvidia do for its FreeBSD drivers. How can I do this in a convenient way ? Mathieu ___ freebsd-hackers@freebsd.org mailing list

do not work nested unnamed anchor

2008-05-08 Thread Igor A. Valcov
Hello. For example: pf.conf ext_if=xl0 ip_world=nn.nn.nn.nn # Filter rules block log all anchor in on $ext_if { pass quick proto tcp to $ip_world port 22 keep state # SSH pass quick proto tcp to $ip_world port 25 keep state # SMTP

Re: binary file within a shell script

2008-05-08 Thread Jille
It's not exactly what you are looking for: But you could take a look at shar(1). I don't even know for sure whether it can archive binaries. shar gives you a shellscript, to which you could prefix your own script, and when you run it, it'll extract the incorporated file, and you can exec it :)

vm_map_insert fails, vm_map-max_offset==0?

2008-05-08 Thread Teemu Rinta-aho
Hi, is it possible to insert a new map entry to a process vm_map from a kernel module? I've tried to use vm_map_insert, vm_map_fixed, vm_map_findspace, but they all fail as the vm_map-max_offset is zero (0). I have looked at vm_mmap etc. but I don't get a clue what I'm doing wrong... BR, Teemu

Re: binary file within a shell script

2008-05-08 Thread Dan Nelson
In the last episode (May 08), Mathieu Prevot said: Hi there, I would like to use one exec file from a shellscript but I would like it to be incorporated in the same file, like Nvidia do for its FreeBSD drivers. How can I do this in a convenient way ? Take a look at the file generated by

vm_map_insert fails, vm_map-max_offset==0?

2008-05-08 Thread Teemu Rinta-aho
Hi, is it possible to insert a new map entry to a process vm_map from a kernel module? I've tried to use vm_map_insert, vm_map_fixed, vm_map_findspace, but they all fail as the vm_map-max_offset is zero (0). I have looked at vm_mmap etc. but I don't get a clue what I'm doing wrong... BR, Teemu

Re: binary file within a shell script

2008-05-08 Thread ari edelkind
[EMAIL PROTECTED] wrote: I would like to use one exec file from a shellscript but I would like it to be incorporated in the same file, like Nvidia do for its FreeBSD drivers. How can I do this in a convenient way ? I haven't looked at nvidia's driver packaging, but you can embed binaries into

SW_PREEMPT and cpu runq

2008-05-08 Thread Murty, Ravi
Hi, When a thread is being switched out and it is being preempted (e.g. time quantum expires), why does sched_switch hold it on the current cpu? i.e. why does the code see that it was preempted and put it back on the same queue? In other cases it looks to see if it can be migrated and the

Re: binary file within a shell script

2008-05-08 Thread ari edelkind
[EMAIL PROTECTED] wrote: echo *** generating ls... file=`mktemp /tmp/ls.XX` [[ $? -eq 0 ]] || exit 1 Er, s/^file/lsfile/, obviously. ari ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To

Re: SW_PREEMPT and cpu runq

2008-05-08 Thread Julian Elischer
Murty, Ravi wrote: Hi, When a thread is being switched out and it is being preempted (e.g. time quantum expires), why does sched_switch hold it on the current cpu? i.e. why does the code see that it was preempted and put it back on the same queue? In other cases it looks to see if it can

RE: SW_PREEMPT and cpu runq

2008-05-08 Thread Murty, Ravi
I guess two places. 1. maybe_preempt() - I've decided to preempt a thread on a cpu and the outgoing thread is held (SW_PREEMPT) on the same cpu. 2. timer expires and thread is out of its slice (ULE), in this case I remove the load and re-add it back to the same (current) cpu. Sorry Julian, yes

RE: SW_PREEMPT and cpu runq

2008-05-08 Thread Murty, Ravi
Oh, I find this happens only in ULE -- during sched_switch(), it sets KEF_HOLD and then calls setrunqueue(). This ensures that the thread does not migrate on preemptions. Ravi -Original Message- From: Murty, Ravi Sent: Thursday, May 08, 2008 3:48 PM To: 'Julian Elischer' Cc: