2 * Copyright 2015, Rene Gollent, rene@gollent.com.
3 * Distributed under the terms of the MIT License.
9 #include "TeamMemory.h"
12 WriteMemoryJob::WriteMemoryJob(Team
* team
,
13 TeamMemory
* teamMemory
, target_addr_t address
, void* data
,
16 fKey(data
, JOB_TYPE_WRITE_MEMORY
),
18 fTeamMemory(teamMemory
),
19 fTargetAddress(address
),
23 fTeamMemory
->AcquireReference();
27 WriteMemoryJob::~WriteMemoryJob()
29 fTeamMemory
->ReleaseReference();
34 WriteMemoryJob::Key() const
43 ssize_t result
= fTeamMemory
->WriteMemory(fTargetAddress
, fData
, fSize
);
47 fTeam
->NotifyMemoryChanged(fTargetAddress
, fSize
);