- sort header order and in groups
- remove all tabs, use only spaces
- use TEMP_FAILURE_RETRY in system calls
- preserve errno for -1 return
Bug: 26871259
Change-Id: I94fffbcaeba01fcc18a3ed07c02389c06c54d3b7
Don't clobber errno if mkstemp failed, always unlink, and only count
mkstemp/ftruncate failures as real failures --- if only the unlink
fails, there's no point not using what we have.
Change-Id: I6bc788682c88651a50a6316b9ca07ba07e9fefa2
Not seeding this each call should help reduce collisions when multiple
threads are calling ashmem_create_region. Also cleaned up code by
deleting gotos, and making formatting consistent.
Bug: 15394258
Change-Id: Iafdaea57b2317e0eb7c40d7b5595c523814fd88c
This is needed by the MemoryFile changes in
https://android-git.corp.google.com/g/2714
where it is used to find out whether a file descriptor
refers to an ashmem region.