Re: why is Size of sigset_t 128 bytes ?
On Wed, Jun 16, 2010 at 9:08 AM, Peter Teoh wrote: > On Tue, Jun 15, 2010 at 9:00 PM, Siddu wrote: > > Hello all, > > > > I came across an article (http://www.linuxjournal.com/article/6483) > about > > signals . Its a very nice article > > > > It says and also i verified that the size of sigset_t showing 128 bytes ? > > > > while code from /* /usr/include/bits/sigset.h */ > > > > "Maybe this is not the right place to ask this Sorry, Hoping someone > > would be knowing the answer " > > > > # define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int))) > > typedef struct > > { > > unsigned long int __val[_SIGSET_NWORDS]; > > } __sigset_t; > > > > typedef __sigset_t sigset_t; > > > > which is definitely not 128 bytes . > > > yes but it is!!! > > 1024/64 > 16 > 8*16 > 128 > > unsigned long int = 8 fyi. > It could also be possible like this On my machine unsigned long int = 4 bytes 1024 / (8 * 4) = 32 32 * 4 = 128 bytes > > > > > Thanks for your inputs ! > > > > -- > > Regards, > > ~Sid~ > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - > > - - - > > Gazing through the window at the world outside, > > Wondering will mother earth survive ? > > Hoping that the mankind will stop abusing her > > Sometime ! > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - > > - - - > > > > > > -- > Regards, > Peter Teoh > -- Regards, ~Sid~ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Gazing through the window at the world outside, Wondering will mother earth survive ? Hoping that the mankind will stop abusing her Sometime ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Re: why is Size of sigset_t 128 bytes ?
On Tue, Jun 15, 2010 at 7:27 PM, Manish Regmi wrote: > On Tue, Jun 15, 2010 at 8:00 AM, Siddu wrote: > > Hello all, > > > > I came across an article (http://www.linuxjournal.com/article/6483) > about > > signals . Its a very nice article > > > > It says and also i verified that the size of sigset_t showing 128 bytes ? > > > > while code from /* /usr/include/bits/sigset.h */ > > > > "Maybe this is not the right place to ask this Sorry, Hoping someone > > would be knowing the answer " > > > > # define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int))) > > typedef struct > > { > > unsigned long int __val[_SIGSET_NWORDS]; > > } __sigset_t; > > > > typedef __sigset_t sigset_t; > > > > which is definitely not 128 bytes . > > > it always adds up to 128 bytes both on 32 and 64 bit machines. > > Haan that's right my bad :( > > > > --- > regards > Manish Regmi > > http://manish-cs.blogspot.com > http://ext2read.sf.net > -- Regards, ~Sid~ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Gazing through the window at the world outside, Wondering will mother earth survive ? Hoping that the mankind will stop abusing her Sometime ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Re: why is Size of sigset_t 128 bytes ?
On Tue, Jun 15, 2010 at 8:00 AM, Siddu wrote: > Hello all, > > I came across an article (http://www.linuxjournal.com/article/6483) about > signals . Its a very nice article > > It says and also i verified that the size of sigset_t showing 128 bytes ? > > while code from /* /usr/include/bits/sigset.h */ > > "Maybe this is not the right place to ask this Sorry, Hoping someone > would be knowing the answer " > > # define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int))) > typedef struct > { > unsigned long int __val[_SIGSET_NWORDS]; > } __sigset_t; > > typedef __sigset_t sigset_t; > > which is definitely not 128 bytes . it always adds up to 128 bytes both on 32 and 64 bit machines. --- regards Manish Regmi http://manish-cs.blogspot.com http://ext2read.sf.net -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecar...@nl.linux.org Please read the FAQ at http://kernelnewbies.org/FAQ
Re: why is Size of sigset_t 128 bytes ?
On Tue, Jun 15, 2010 at 6:30 PM, Siddu wrote: > Hello all, > > I came across an article (http://www.linuxjournal.com/article/6483) about > signals . Its a very nice article > > It says and also i verified that the size of sigset_t showing 128 bytes ? > > while code from /* /usr/include/bits/sigset.h */ > > "Maybe this is not the right place to ask this Sorry, Hoping someone > would be knowing the answer " > > # define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int))) > typedef struct > { > unsigned long int __val[_SIGSET_NWORDS]; > } __sigset_t; > > typedef __sigset_t sigset_t; > > which is definitely not 128 bytes . Why not ??? Assuming 32 bit machines unsigned long int is 4 bytes, and you are declaring and array of 32 elements of 4 bytes each. > > Thanks for your inputs ! > > -- > Regards, > ~Sid~ > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - > Gazing through the window at the world outside, > Wondering will mother earth survive ? > Hoping that the mankind will stop abusing her > Sometime ! > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - > -- Thanks - Manish == [$\*.^ -- I miss being one of them == -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecar...@nl.linux.org Please read the FAQ at http://kernelnewbies.org/FAQ
why is Size of sigset_t 128 bytes ?
Hello all, I came across an article (http://www.linuxjournal.com/article/6483) about signals . Its a very nice article It says and also i verified that the size of sigset_t showing 128 bytes ? while code from /** /usr/include/bits/sigset.h **/ "Maybe this is not the right place to ask this Sorry, Hoping someone would be knowing the answer " *# define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int))) typedef struct { unsigned long int __val[_SIGSET_NWORDS]; } __sigset_t; typedef __sigset_t sigset_t; *which is definitely not 128 bytes . Thanks for your inputs ! -- Regards, ~Sid~ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Gazing through the window at the world outside, Wondering will mother earth survive ? Hoping that the mankind will stop abusing her Sometime ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -