64-bit fixes for ProcessController.
This commit is contained in:
@@ -115,10 +115,10 @@ PCApplication::ReadyToRun()
|
|||||||
// quit other eventually running instances
|
// quit other eventually running instances
|
||||||
BList list;
|
BList list;
|
||||||
be_roster->GetAppList(kSignature, &list);
|
be_roster->GetAppList(kSignature, &list);
|
||||||
long count = list.CountItems();
|
int32 count = list.CountItems();
|
||||||
if (count > 1) {
|
if (count > 1) {
|
||||||
for (long i = 0; i < count - 1; i++) {
|
for (int32 i = 0; i < count - 1; i++) {
|
||||||
BMessenger* otherme = new BMessenger(NULL, (team_id)list.ItemAt(i));
|
BMessenger* otherme = new BMessenger(NULL, (addr_t)list.ItemAt(i));
|
||||||
BMessage* message = new BMessage(B_QUIT_REQUESTED);
|
BMessage* message = new BMessage(B_QUIT_REQUESTED);
|
||||||
otherme->SendMessage(message);
|
otherme->SendMessage(message);
|
||||||
delete otherme;
|
delete otherme;
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ bool gInDeskbar = false;
|
|||||||
|
|
||||||
#define addtopbottom(x) if (top) popup->AddItem(x); else popup->AddItem(x, 0)
|
#define addtopbottom(x) if (top) popup->AddItem(x); else popup->AddItem(x, 0)
|
||||||
|
|
||||||
long thread_popup(void *arg);
|
status_t thread_popup(void *arg);
|
||||||
|
|
||||||
int32 gPopupFlag = 0;
|
int32 gPopupFlag = 0;
|
||||||
thread_id gPopupThreadID = 0;
|
thread_id gPopupThreadID = 0;
|
||||||
@@ -103,8 +103,8 @@ typedef struct {
|
|||||||
|
|
||||||
#define DEBUG_THREADS 1
|
#define DEBUG_THREADS 1
|
||||||
|
|
||||||
long thread_quit_application(void *arg);
|
status_t thread_quit_application(void *arg);
|
||||||
long thread_debug_thread(void *arg);
|
status_t thread_debug_thread(void *arg);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
thread_id thread;
|
thread_id thread;
|
||||||
@@ -257,7 +257,7 @@ ProcessController::MessageReceived(BMessage *message)
|
|||||||
if (message->FindInt32("team", &team) == B_OK) {
|
if (message->FindInt32("team", &team) == B_OK) {
|
||||||
resume_thread(spawn_thread(thread_quit_application,
|
resume_thread(spawn_thread(thread_quit_application,
|
||||||
B_TRANSLATE("Quit application"), B_NORMAL_PRIORITY,
|
B_TRANSLATE("Quit application"), B_NORMAL_PRIORITY,
|
||||||
(void*) team));
|
(void*)(addr_t)team));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -342,7 +342,7 @@ ProcessController::MessageReceived(BMessage *message)
|
|||||||
|
|
||||||
case 'PrTh':
|
case 'PrTh':
|
||||||
if (message->FindInt32("thread", &thread) == B_OK) {
|
if (message->FindInt32("thread", &thread) == B_OK) {
|
||||||
long new_priority;
|
int32 new_priority;
|
||||||
if (message->FindInt32("priority", &new_priority) == B_OK)
|
if (message->FindInt32("priority", &new_priority) == B_OK)
|
||||||
set_thread_priority(thread, new_priority);
|
set_thread_priority(thread, new_priority);
|
||||||
}
|
}
|
||||||
@@ -665,7 +665,7 @@ ProcessController::Update()
|
|||||||
// #pragma mark -
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
long
|
status_t
|
||||||
thread_popup(void *arg)
|
thread_popup(void *arg)
|
||||||
{
|
{
|
||||||
Tpopup_param* param = (Tpopup_param*) arg;
|
Tpopup_param* param = (Tpopup_param*) arg;
|
||||||
@@ -829,16 +829,16 @@ thread_popup(void *arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
long
|
status_t
|
||||||
thread_quit_application(void *arg)
|
thread_quit_application(void *arg)
|
||||||
{
|
{
|
||||||
BMessenger messenger(NULL, (team_id)arg);
|
BMessenger messenger(NULL, (addr_t)arg);
|
||||||
messenger.SendMessage(B_QUIT_REQUESTED);
|
messenger.SendMessage(B_QUIT_REQUESTED);
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
long
|
status_t
|
||||||
thread_debug_thread(void *arg)
|
thread_debug_thread(void *arg)
|
||||||
{
|
{
|
||||||
Tdebug_thead_param* param = (Tdebug_thead_param*) arg;
|
Tdebug_thead_param* param = (Tdebug_thead_param*) arg;
|
||||||
|
|||||||
@@ -72,13 +72,13 @@ QuitMenu::AttachedToWindow()
|
|||||||
for (int t = CountItems() - 1; t >= 0; t--) {
|
for (int t = CountItems() - 1; t >= 0; t--) {
|
||||||
QuitMenuItem* item = (QuitMenuItem*)ItemAt(t);
|
QuitMenuItem* item = (QuitMenuItem*)ItemAt(t);
|
||||||
bool found = false;
|
bool found = false;
|
||||||
for (int a = 0; !found && (tmid = (team_id)apps.ItemAt(a)) != 0; a++)
|
for (int a = 0; !found && (tmid = (team_id)(addr_t)apps.ItemAt(a)) != 0; a++)
|
||||||
if (item->Team() == tmid)
|
if (item->Team() == tmid)
|
||||||
found = true;
|
found = true;
|
||||||
if (!found)
|
if (!found)
|
||||||
RemoveItem(t);
|
RemoveItem(t);
|
||||||
}
|
}
|
||||||
for (int a = 0; (tmid = (team_id) apps.ItemAt(a)) != 0; a++) {
|
for (int a = 0; (tmid = (team_id)(addr_t) apps.ItemAt(a)) != 0; a++) {
|
||||||
AddTeam(tmid);
|
AddTeam(tmid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -134,10 +134,10 @@ find_self(entry_ref& ref)
|
|||||||
int32 cookie = 0;
|
int32 cookie = 0;
|
||||||
image_info info;
|
image_info info;
|
||||||
while (get_next_image_info (0, &cookie, &info) == B_OK) {
|
while (get_next_image_info (0, &cookie, &info) == B_OK) {
|
||||||
if (((uint32)info.text <= (uint32)move_to_deskbar
|
if (((addr_t)info.text <= (addr_t)move_to_deskbar
|
||||||
&& (uint32)info.text + (uint32)info.text_size > (uint32)move_to_deskbar)
|
&& (addr_t)info.text + (size_t)info.text_size > (addr_t)move_to_deskbar)
|
||||||
|| ((uint32)info.data <= (uint32)move_to_deskbar
|
|| ((addr_t)info.data <= (addr_t)move_to_deskbar
|
||||||
&& (uint32)info.data + (uint32)info.data_size > (uint32)move_to_deskbar)) {
|
&& (addr_t)info.data + (size_t)info.data_size > (addr_t)move_to_deskbar)) {
|
||||||
if (get_ref_for_path (info.name, &ref) == B_OK)
|
if (get_ref_for_path (info.name, &ref) == B_OK)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user