Re: How to get stack bounds of current process?

2010-05-11 Thread perryh
Lev Serebryakov l...@freebsd.org!lev@agora.rdrop.com wrote: I'm not sure, should BSD port behaves as Linux or as Solaris one. Based solely on heritage, I suspect the Solaris approach might fit more comfortably. Solaris comes from SVR4, which was supposed to be the great reunification of

Re: Ability to tell the difference between normal and syscall traps

2010-05-11 Thread Ali Polatel
Kostik Belousov yazmış: On Mon, May 10, 2010 at 07:48:47PM +0300, Ali Polatel wrote: Kostik Belousov yazm??: On Sun, May 09, 2010 at 09:28:51PM +0300, Ali Polatel wrote: Kostik Belousov yazm??: On Sun, May 09, 2010 at 08:33:03AM +0300, Ali Polatel wrote: Kostik Belousov

Re: Ability to tell the difference between normal and syscall traps

2010-05-11 Thread Kostik Belousov
On Tue, May 11, 2010 at 01:35:00PM +0300, Ali Polatel wrote: Kostik Belousov yazm??: On Mon, May 10, 2010 at 07:48:47PM +0300, Ali Polatel wrote: Kostik Belousov yazm??: On Sun, May 09, 2010 at 09:28:51PM +0300, Ali Polatel wrote: Kostik Belousov yazm??: On Sun, May 09, 2010

Re: Recursion in the UVA

2010-05-11 Thread Andrey Simonenko
On Mon, May 10, 2010 at 11:42:26AM -0700, Evan Geller wrote: I'm a bit confused how recursion in the UVA works. vm_map_entries are allocated from a vm_map_entry zone, but if the vm_map_entry slabs are full and it needs to allocate a vm_map_entry to satisfy the mapping, there would seem to be a

Re: hifn(4) DMA fix for review

2010-05-11 Thread Patrick Lamaiziere
Le Mon, 10 May 2010 08:26:08 -0700, Sam Leffler s...@errno.com a écrit : Hello, I noticed several things in hifn, if you want to look: http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/130286 IMHO some locks are missing in the use of sc-sc_sessions (the array containing the sessions) :

Re: How to get stack bounds of current process?

2010-05-11 Thread Robert Watson
On Mon, 10 May 2010, Lev Serebryakov wrote: I'm proting some application from Linux, which discover its stack bounds by reading and pasing /proc/self/maps. FreeBSD have /prov/curproc/map, but I can not find how to determine which record is for stack (I've looked into implementation of

Re: How to get stack bounds of current process?

2010-05-11 Thread Kostik Belousov
On Tue, May 11, 2010 at 08:23:41PM +0100, Robert Watson wrote: On Mon, 10 May 2010, Lev Serebryakov wrote: I'm proting some application from Linux, which discover its stack bounds by reading and pasing /proc/self/maps. FreeBSD have /prov/curproc/map, but I can not find how to

proposed change to style(9): require yoda style if statements

2010-05-11 Thread Eitan Adler
My proposal is simple: require that any if statement that compares a constant to a mutable variable be written as if (constant == variable) instead of if (variable == constant) this prevents an extremely common programming error if (variable = constant) While this is almost always found in

Re: proposed change to style(9): require yoda style if statements

2010-05-11 Thread Max Laier
On Tuesday 11 May 2010 21:36:11 Eitan Adler wrote: My proposal is simple: require that any if statement that compares a constant to a mutable variable be written as if (constant == variable) instead of if (variable == constant) this prevents an extremely common programming error if

Re: proposed change to style(9): require yoda style if statements

2010-05-11 Thread Eitan Adler
With proper -W flags, if (var = const) also yields a warning:  warning: suggest parentheses around assignment used as truth value Chaning style(9) in such a fundamental way almost, always isn't a good idea. It's simply unrealistic to change all current code to comply and the difference

Re: proposed change to style(9): require yoda style if statements

2010-05-11 Thread Shteryana Shopova
In my humble opinion, With proper -W flags (i.e. -Wall -Werror), the compilation will fail on if (var = const) also yoda statements of the kind if (constant == variable) obfuscate code and make it more difficult to read, definately not a good idea IMHO, added the confusion between old and new