Commit Graph

13340 Commits

Author SHA1 Message Date
Axel Dörfler
d14aab0dca Changed the way how CPU activity is monitored: instead of taking the active
time of the idle thread as a measure, we now compute the CPU activity on
each thread switch - the time the CPU worked is the total of user and kernel
time a thread spent during its quantum.
Unlike before, this mechanism works correctly on SMP machines. I hope this
works as expected :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16193 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-01 20:03:55 +00:00
Jérôme Duval
a5fa64b505 some changes : alert if free space isn't enough, set status when mouse is over packages (doesn't work for some reason ...)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16192 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-01 17:45:20 +00:00
Jérôme Duval
d6b6f8bfe1 made codycam beos compatible
fixed net libs link


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16191 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-01 17:42:31 +00:00
Jérôme Duval
b2dde401e5 made Magnify beos compatible
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16190 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-01 16:22:00 +00:00
Jérôme Duval
a5050b61fd made SoundRecorder beos compatible
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16189 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-01 16:19:35 +00:00
Jérôme Duval
1013215e2d made GLTeapot beos compatible
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16188 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-01 16:14:47 +00:00
Jérôme Duval
26a6b3bedc made Clock beos compatible
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16187 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-01 16:09:16 +00:00
Axel Dörfler
df213cedbc * CPUs can now be disabled - that is, they will keep idling.
* Added syscalls _kern_set_cpu_enabled() and _kern_cpu_enabled().
* scheduler.c::sRunQueue::tail was not maintained at all; changed sRunQueue to
  be a simple thread pointer instead of a struct thread_queue.
* Turns out we're monitoring CPU activity incorrectly when we've got more
  than one CPU.
* Renamed the global CPU array from "cpu" to gCPU.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16186 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-01 16:09:05 +00:00
Jérôme Duval
0f11a95a97 fixed build on R5
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16185 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-01 16:06:36 +00:00
Axel Dörfler
4ccfb08661 * Fixed memory leak in CPUButton: the message runner was only deleted in the
destructor, but created everytime AttachedToWindow() was called.
* Minor cleanups.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16184 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-01 15:57:45 +00:00
Axel Dörfler
a71c960755 * BControl::SetValue() now calls Invalidate() again - not doing so would
break compatibility a bit too much (as this is a public class).
* Instead, we're now using the same mechanism as in Dano/Zeta, that is,
  we use BControl::SetValueNoUpdate() in the inherited classes.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16183 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-01 15:55:46 +00:00
Jérôme Duval
5376b695a4 made r5 compatible
added virtual on destructors


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16182 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-01 15:47:46 +00:00
Axel Dörfler
2457c453c5 * Now calls get_current_cpuid() instead of get_cpuid() - that doesn't work on
SMP machines since we're already in a call_all_cpus() function (that also
  needs to run synchronously). MTRR does now work on SMP machines again; ie.
  SMP machines should boot fine again now.
* Fixed warning when compiled with tracing turned on.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16181 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-01 12:39:20 +00:00
Axel Dörfler
99085d6771 Added an extra debug function that dumps all iframes in case the stack crawl
doesn't work correctly for some reason.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16180 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-01 12:35:10 +00:00
Axel Dörfler
562c5a27d9 Make sure the compiler knows what we want.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16179 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-01 12:34:03 +00:00
Ingo Weinhold
00113ff97b Couldn't resist using one of the nice new BResources::SetToImage()
methods. Currently guarded by an "#ifdef __HAIKU__", as long as we
want to be able to build a BeOS compatible Clock.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16177 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-01 00:17:47 +00:00
Ingo Weinhold
1cac47bfa9 Added a few more constructors and initialization methods. Among them two
SetToImage() variants for initializing the object to the resources of
the shared object file belonging to a loaded image. Should be handy for
libraries and add-ons.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16176 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-01 00:15:01 +00:00
Stefano Ceccherini
55b35fb4d5 Empty menus now display an '<empty>' label
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16175 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-31 23:28:19 +00:00
Stefano Ceccherini
667fa89b02 BDirectwindow is notified when workspace changes. Fixes bug #99
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16174 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-31 23:12:29 +00:00
Axel Dörfler
f1d806fe5d Fixed call_all_cpus(): it shouldn't call the function synchronously; inter-CPU
synchronization as done in init_mtrrs() failed because of that (let the system
hang).
Unfortunately, MTRR still doesn't work on my dual PIII with SMP enabled; that
was just one reason it didn't work.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16173 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-31 18:30:34 +00:00
Rudolf Cornelissen
d06a632f24 updated docs.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16172 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-31 14:20:24 +00:00
Rudolf Cornelissen
8a72136d5f now blocking SCALED_BLIT hook export on modes with space B_CMAP8. We won't support this space, at least for now. It's not yet testable for me, and this space is partial supported only (at best), on some cards outthere.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16171 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-31 14:17:20 +00:00
Ingo Weinhold
1a3348d9c2 Replaced TODO by explanatory comment, why the resources are retrieved this
way.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16170 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-31 12:41:58 +00:00
Rudolf Cornelissen
d24c6abf98 comment update: pitch granularity now confirmed for 15, 16 and 32bit RGB depths (SCALED_BLIT).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16169 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-31 11:06:59 +00:00
Rudolf Cornelissen
9f6aebed5f updated SCALED_BLIT to do 15-bit space correctly.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16168 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-31 10:32:15 +00:00
Axel Dörfler
fd1528f275 Accidently broke selecting sub menus with the last commit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16167 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-31 03:31:23 +00:00
Axel Dörfler
204131dc97 Added a real yield function to the kernel (using the next_priority approach).
The test application lets run a thread at the highest priority that calls
yield all the time - the system stays responsible when it runs, so it seems
to work fine :)
Changed the malloc implementation to use _kern_thread_yield() instead of
snoozing.
We should think about making this call public, too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16166 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-31 02:29:02 +00:00
Axel Dörfler
d14af9fde6 Introduced a next_priority field to struct thread that will be used when
enqueueing a thread to the run queue.
This mechanism is now used for the thread priority boost on semaphore
release. Also, those threads are no longer made real time threads, they
now get a temporary priority of B_FIRST_REAL_TIME_PRIORITY - 1.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16165 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-31 01:58:49 +00:00
Ingo Weinhold
a324efcfdc Added TODO.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16164 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-31 01:46:43 +00:00
Ingo Weinhold
29d7e9cdd6 Our FS is case sensitive, and the create_app_meta_mime() implementation
didn't bring the app signature into its canonical lower-case form when
using it as path to the MIME DB file. Thus an application signature
MIME type didn't get any attributes, not even the path to the app's
executable, which led to all kinds of problems when finding or starting
applications by signature. Among them, Clock not finding its resources
(bug #74).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16163 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-31 01:09:02 +00:00
Ingo Weinhold
1ba1f4be4a If the "if" block is more than one line long, braces should be used, even
if it doesn't make a semantical difference. I can't believe I've written
that code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16162 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-31 01:01:21 +00:00
Axel Dörfler
7e46f8319e snooze(5) works more or less fine for standard threads, but is a very bad
idea for real-time threads. They could completely hog the CPU in this
case. Thanks to Marcus for investigating!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16161 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-31 00:11:51 +00:00
Axel Dörfler
ec549309c9 The menus work a bit less good now I think, but they no longer have 100% CPU usage
when the menu item under the mouse cursor has a sub-menu.
Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16160 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-30 23:40:05 +00:00
Marcus Overhagen
badb1d4be6 optimized debug output, and enabled PCI bus (re-)enumeration
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16159 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-30 23:09:28 +00:00
Marcus Overhagen
9797f71b23 Added PCI bus (re-)enumeration for all domains, but disabled by default.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16158 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-30 22:26:51 +00:00
Marcus Overhagen
84f007fba9 made access to keyboard controller and dev->flags thread save
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16157 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-30 20:14:51 +00:00
Jérôme Duval
bd9d5861cb added driver settings, untested
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16155 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-30 17:07:11 +00:00
Axel Dörfler
5d16441307 Now usually ignores the length of the data segment as well.
It now works fine on my P4 system as well :-)
But since the BIOS area is not identity mapped, it might work on fewer systems
than it does in BeOS R5.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16154 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-30 16:32:47 +00:00
Axel Dörfler
afef4f3fff The syslog_daemon now ignores zero length messages, and the kernel's syslog
mechanism doesn't send them out any longer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16153 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-30 16:09:24 +00:00
Axel Dörfler
bd610d2fcd * Added kernel settings for APM - defaults to disabled (since it doesn't work
on at least one of my systems, it only works on 3 of them...).
* Added APM safemode setting.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16152 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-30 14:43:38 +00:00
Jérôme Duval
7f40667cbc Installer scripts are not executable, we launch them with sh
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16151 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-30 14:05:40 +00:00
Axel Dörfler
c7023acdc6 * Fixed B_AVOID_FRONT support in the app_server.
* Menu windows now use the kMenuWindowFeel feel (but still need the B_AVOID_FOCUS
  flag set, as that's currently independent from the feel).
* Minor cleanup in MenuWindow.cpp


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16150 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-30 13:40:22 +00:00
Axel Dörfler
304636cc5e Implemented kMenuWindowFeel, not that much tested, though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16149 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-30 11:50:02 +00:00
Ingo Weinhold
04fcc147ca * Small fixes.
* Added --dry-run option for paranoid ones like me.
* Added support for making partition devices bootable under Linux (x86, BIOS).
  
When specifying respective values for HAIKU_IMAGE_{DIR,NAME} ("/dev" and
e.g. "sda7") a "jam haiku-image" will now replace the contents of your
favorite partition with a fresh Haiku installation. BE WARNED: This is nothing
for the faint of heart and I don't guarantee that my implementation is bug-free
and won't mangle the contents of your hard disk even if you use it correctly.

That being said, note that you'll probably have to run the "jam haiku-image"
as root, if you want to access the partition devices, which is a bit annoying.
Furthermore, if the build_haiku_image script fails for any reason, jam tends
to remove the image file, which in this case would be a partition device node.
The mknod command will be your friend in this case.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16148 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-30 01:50:50 +00:00
Ingo Weinhold
deeb2f399a A bit of #ifdef'ing to make the stuff edible for userland compilation
with gcc 4.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16147 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-30 01:22:11 +00:00
Ingo Weinhold
4b0e1b9bda * We map ioctl() to the build platform manually now. For Linux we
implement the B_GET_GEOMETRY command in a usable way. The bfs_shell is
  able to play with partition devices under Linux, now.
* Fixed two warnings.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16146 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-30 01:19:11 +00:00
Ingo Weinhold
51855db4b0 Added cleanup for the external command stuff, so that the UNIX flavored
implementation can unlink the named pipe.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16145 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-30 01:13:48 +00:00
Marcus Overhagen
64faaed88a cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16144 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-30 00:00:52 +00:00
Jérôme Duval
acf395bb4b added rdef for mimeset
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16143 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-29 23:01:09 +00:00
Stefano Ceccherini
61ba5a32c1 Added some code to draw "empty" in empty menus. Not working for the
moment, but committing since it's too late to continue working, and at 
least the window is resized correctly...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16142 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-29 22:27:46 +00:00