From 426fe7db1db7b0f85660e792f7166ddcf96c4ac8 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Mon, 11 Nov 2013 18:47:21 +0100 Subject: [PATCH] IORequest::_CopyData(): Small optimization If we're running in the context of the user team the I/O buffer belongs to, we can use _CopySimple() as well. --- src/system/kernel/device_manager/IORequest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/system/kernel/device_manager/IORequest.cpp b/src/system/kernel/device_manager/IORequest.cpp index 19b9be3bd3..48ae3b7423 100644 --- a/src/system/kernel/device_manager/IORequest.cpp +++ b/src/system/kernel/device_manager/IORequest.cpp @@ -1173,7 +1173,7 @@ IORequest::_CopyData(void* _buffer, off_t offset, size_t size, bool copyIn) if (fBuffer->IsPhysical()) { copyFunction = &IORequest::_CopyPhysical; } else { - copyFunction = fBuffer->IsUser() + copyFunction = fBuffer->IsUser() && fTeam != team_get_current_team_id() ? &IORequest::_CopyUser : &IORequest::_CopySimple; }