Re: android ashmem patch [review request]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1 May 2013 13:34, Aaron Carroll <xaaronc@xxxxxxxxx> wrote:
> On 1 May 2013 08:04, Akers, Jason B <jason.b.akers@xxxxxxxxx> wrote:
>> I wrapped the ashmem calls with the existing shm* function definitions. It's a little ugly, but makes for an easy patch touching only os/os-android.h.
>>
>> Tested on both arm and x86 android phones.
>>
>> [..]
>>
>>  static inline int shmctl (int __shmid, int __cmd, struct shmid_ds *__buf)
>>  {
>> -       return syscall(__NR_shmctl, __shmid, __cmd, __buf);
>> +       int ret=0;
>> +       if (__cmd == IPC_RMID)
>> +       {
>> +               int length = ioctl(__shmid, ASHMEM_GET_SIZE, NULL);
>> +               struct ashmem_pin pin = {0 , length};
>> +               ret = ioctl(__shmid, ASHMEM_UNPIN, &pin);
>
> I'm not sure that you want to make the region unpinned. How can we
> recover if the region is reclaimed?

Oops, didn't notice that was on the RMID path, ignore that.

  -- Aaron
--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux