Re: Compiling kernel with gcc43

2010-03-26 Thread Jille Timmermans

Op 25-3-2010 18:31, Garrett Cooper schreef:

-Wno-error .
-Garrett
   

I tried building world with it; but it doesn't seem to work :(

[q...@istud /usr/src]$ CFLAGS=-Wno-error -Garrett make buildworld
[snip]
cc: unrecognized option '-Garrett'

;)

-- Jille
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Compiling kernel with gcc43

2010-03-26 Thread Jille Timmermans

Op 26-3-2010 17:17, jhell schreef:


On Fri, 26 Mar 2010 09:01, Jille Timmermans wrote:
In Message-Id: 4bacb021.9000...@quis.cx


Op 25-3-2010 18:31, Garrett Cooper schreef:

-Wno-error .
-Garrett


I tried building world with it; but it doesn't seem to work :(

[q...@istud /usr/src]$ CFLAGS=-Wno-error -Garrett make buildworld
[snip]
cc: unrecognized option '-Garrett'

;)

-- Jille


ROFL I sure hope your kidding!

because cc --Jille won't work either!



Let me fix that for you ;)

Index: opts.c
===
--- opts.c  (revision 205649)
+++ opts.c  (working copy)
@@ -429,6 +429,10 @@
}
}
}
+  else if (!strcmp (argv[i], --Jille))
+   {
+ optimize = 3;
+   }
 }

   if (!optimize)

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Suggestion: rename killall to fkill, but wait five years to phase the new name in

2009-12-22 Thread Jille Timmermans
You forgot to mention that we should wait ten years; and after that
change it's name to killall

Stephen Montgomery-Smith schreef:
 I would like to introduce a program into the base called
 screw-the-whole-system.  It would do something like this:

 while true; do \
 echo Please wait while your system is being destroyed...
 sleep 10
 done

 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to
 freebsd-hackers-unsubscr...@freebsd.org
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: pahole - Finding holes in kernel structs

2009-02-12 Thread Jille Timmermans

Julian Stacey schreef:
1) Is it worth my time trying to rearrange structs? 


I wondered whether as a sensitivity test, some version of gcc (or
its competitor ?) might have capability to automatically re-order
variables ?  but found nothing in man gcc Optimization Options.
There is a __packed attribute, I don't know what it exactly does and 
whether it is an improvement.


-- Jille


Cheers,
Julian

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: missing mount_devfs

2008-12-17 Thread Jille Timmermans
# alias mount_devfs=mount -t devfs

(human: try mount -t devfs instead of mount_devfs)

-- Jille
(I think freebsd-questions is the appropriate list for this)

oxy schreef:
 hi!
 
 I installed 7.0-RELEASE/amd64 and tried to create a jail with jailctl.
 after a couple errors i noticed that mount_devfs is missing!
 is there any other way to create devfs in order to make jails?
 thank you!
 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: sleep is not working to avoid starvation among threads of same priority

2008-10-07 Thread Jille Timmermans

Hello,

Take a look at pthread_yield():

DESCRIPTION
The pthread_yield() forces the running thread to relinquish the 
processor

until it again becomes the head of its thread list.

(Note that it is not portable)

And if you want to use sleep, I found out that using sleep with more ms 
does 'yield' the thread/process.

iirc, 20ms was enough to stop it from using 100% CPU.

-- Jille

Ramachandran Sathyanarayanan wrote:

Hi

 I hope this is the right mailer for this question. pls let us know your inputs 
on this.

Thanks

Ram


From: Rajeshwar Patil
Sent: Tuesday, October 07, 2008 3:36 PM
To: [EMAIL PROTECTED]
Cc: Ramachandran Sathyanarayanan; Rajeshwar Patil
Subject: sleep is not working to avoid starvation among threads of same priority

Hi,

I have two threads of same priority lets say thread A and thread B, thread A is 
starving since thread B has got a for loop of size 100k. So, to avoid 
starvation I am processing 1000 iterations of for loop(that of thread B) in one 
batch and giving sleep of 1ms, but still thread A is starving. If I increase 
the batch size used in for loop from 1k to 10k then starvation of thread A is 
little less whereas it should be more as Im increasing processing time of 
thread B. I tried various combinations of sleeps and batches, but I couldnt 
solve the starvation of thread A.

Is the sleep right solution?

I will be grateful if someone could answer on this.

Thanks
Rajeshwar







DISCLAIMER: This message is proprietary to Aricent and is intended solely for the 
use of the individual to whom it is addressed. It may contain privileged or confidential 
information and should not be circulated or used for any purpose other than for what it 
is intended. If you have received this message in error,please notify the originator 
immediately. If you are not the intended recipient, you are notified that you are 
strictly prohibited from using, copying, altering, or disclosing the contents of this 
message. Aricent accepts no responsibility for loss or damage arising from the use of the 
information transmitted by this email including damage from virus.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]
  

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


readdir(somefile) returing inconsistent errors

2008-09-11 Thread Jille Timmermans
Hello,

I was looking through some vop_readdir()'s, and noticed an inconsistency
between (at least) xfs and unionfs.

sys/fs/unionfs/union_vnops.c:1410:
if(ap-a_vp-v_type != VDIR)
return (ENOTDIR);

sys/fs/xfs/FreeBSD/xfs_vnops.c:1001:
if(vp-v_type != VDIR)
return (EPERM);

A little userland script gave me a ENOTDIR when trying to
opendir(somefile) (userspace opendir() calling kernelspace readdir()).

So I assume the check is made earlier, but shouldn't the xfs code return
ENOTDIR in this case ?
due to the if-clause above it, you'd say ENOTDIR seems better than EPERM.


-- Jille
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Filtering items in readdir() with own fs

2008-09-11 Thread Jille Timmermans
Hello all,

information skipable=yes
I am trying to create a filesystem that works exactly like nullfs, but
hides all .svn dirs (and contents) (Yes, I started with svn cp).
I've got it working so far that it denies that the dirs and contents
exist (grep isn't complaining; so I can finally grep -r through the source).
But it would be nice if I can also hide the .svn dirs in dir listings.
/introduction

problem
I have been looking through a few existing filesystems (unionfs,
fdescfs, xfs, devfs).
None gave me a good way for hiding specific entries in the listing.
With some help of unionfs I have created a direct-pass-through using
VOP_READDIR(), but I can't filter it with that.
I tried using some xfs code, but didn't get any result with that.
/problem

question
Can anyone give me a hint on where to start looking for code that could
be used with filtering functionality ?
Any file or function ?
/question

Thanks in advance,
-- Jille
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: command-line bittorrent utility

2008-06-26 Thread Jille Timmermans

(enhanced) ctorrent

Kris Kennaway schreef:
I am looking for a command-line utility that can fetch via bittorrent 
that


a) doesn't use curses.  It must be usable in a script and without a tty!

b) doesn't use X11.  Must be a command-line utility!

c) Must be able to inform the script when the transfer is complete.  A 
callback mechanism of some kind is fine as long as it doesn't require 
polling.


This is for distribution of files within a LAN and WAN: I have some 
large files that I need to distribute to many machines, and pushing 
them all out multiple times from the server is inefficient.


Things that come close:

* The python implementation, but it doesn't seem to work very 
reliably.  I get errors and exceptions from both the client and server 
when transferring a file with only two machines participating.


* http://www.murmeldjur.se/btpd/ is a daemon with command line client. 
It doesn't provide for c), and it also doesn't work reliably.


* Not much else.

Surely I am not the first person to want to use bittorrent in a script?

Kris

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to 
[EMAIL PROTECTED]

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Trying (not) to crash with libpthread (6.3-RELEASE)

2008-05-16 Thread Jille Timmermans

Hello,

I'm trying to catch SIGSEGV, to be able to run 'unchecked' (possibly 
crashing) code.

And not letting the entire program die, but just kill that thread.
So I wrote some testing code.
But, I ran into a problem; the signal-handler does not work when a 
thread is created (or something like that).

The code below crashes on SIGSEGV, but should die in void sigcatcher(int);
If you uncomment the crashingthread(NULL); line, it will die in the 
signal handler.


pthread_create seems to take over signal handling.
I quickly checked some pthread source, and it seems that it should call 
my own handler.

(There might be an exception for some signals, but I didn't found that)

Can anyone explain me what is happening here ?

-- Jille


cc -lpthread below.c
#include stdlib.h
#include stdio.h
#include unistd.h
#include pthread.h
#include signal.h
#include err.h

int success=0;

void
sigcatcher(int sig) {
 printf([%p] signal %d\n, pthread_self(), sig);
 printf(Test (probably) succeeded\n);
 fflush(NULL);
 success=1;
 exit(0);
}

void *
crashingthread(void *nada) {
 /* This will likely crash */
 char *x=malloc(1);

 if(signal(SIGSEGV, sigcatcher)==SIG_ERR)
   err(1, signal(SIGSEGV, catchz0r));

 x[666]=0;

 /* HOPEFULLY NOT REACHED (aargh! die harder!) */

 int i;
 for(i=1; 99i; i++)
   x[i]=0;

 /* NOT REACHED (either killed, or exit()'ed in sigcatcher) */
 abort();
}

int
main(int argc, char **argv) {
 pthread_t thr;

 if(signal(SIGSEGV, sigcatcher)==SIG_ERR)
   err(1, signal(SIGSEGV, catchz0r));

 //crashingthread(NULL);
 pthread_create(thr, NULL, crashingthread, NULL);

 sleep(3);
 return 0;
}

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


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 :)

-- Jille
(Resend from right email-adres)

Mathieu Prevot wrote:

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
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]
  


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: devctl (alike?) for devfs

2008-04-22 Thread Jille

Andriy Gapon wrote:

Maybe this is a crazy idea or maybe we already have something like this.
Is it possible to get notifications about changes in devfs - appearance
and disappearance of devices (in devfs sense of the word)?
devctl currently notifies about real (hardware) devices handled by
device drivers and some notifications about hardware/driver events.
But what if I want to automatically run some action if
/dev/ufs/magic-label appears?
Or if I want to monitor appearance and disappearance of ad* and da*
devices (without having to monitor low level drivers like umass)?



I don't know whether it is what you are looking for, but take a look at 
devd(8).


-- Jille
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]