2006-12-28 Dan Williams <dcbw@redhat.com>

Use a single thread for everything.  With the move to wpa_supplicant
	and communication over D-Bus, there's no reason for multiple threads.
	Almost all of the blocking code has been removed, with one exception in
	the DHCP manager and a few in the VPN manager.  This commit removes the
	per-device worker thread and fixes activation cancellation in the absence
	of threads.  Further removal of thread-related code would be removing
	any locking code (like the device list lock) and simplification of logic
	around areas of code or data structures that are currently locked.

	* autoip.c
	  dhcp-manager/nm-dhcp-manager.c
	  nm-device-802-11-wireless.c
	  nm-device-802-3-ethernet.c
	  nm-device.c
	  nm-device.h
		- Remove usage of multiple threads


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2197 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams
2006-12-28 22:13:59 +00:00
parent 89d698ef95
commit a423162b36
7 changed files with 195 additions and 368 deletions

View File

@@ -560,12 +560,9 @@ nm_completion_dhcp_bound_test (int tries,
nm_completion_args args)
{
NMActRequest * req = args[0];
NMDevice * dev = args[1];
if (state_is_bound (nm_act_request_get_dhcp_state (req)))
return TRUE;
if (nm_device_activation_should_cancel (dev))
return TRUE;
return FALSE;
}
@@ -618,8 +615,6 @@ nm_dhcp_manager_get_ip4_config (NMDHCPManager *manager,
args[1] = dev;
nm_wait_for_completion (30, G_USEC_PER_SEC / 10,
nm_completion_dhcp_bound_test, NULL, args);
if (nm_device_activation_should_cancel (dev))
return NULL;
if (!state_is_bound (nm_act_request_get_dhcp_state (req))) {
nm_warning ("Tried to get IP4 Config for a device when dhcdbd "