Skip to content

shmem: improvements - #16

Draft
Maxython wants to merge 1 commit into
masterfrom
shmem-improvements
Draft

shmem: improvements#16
Maxython wants to merge 1 commit into
masterfrom
shmem-improvements

Conversation

@Maxython

@Maxython Maxython commented Feb 3, 2025

Copy link
Copy Markdown
Member

The possibility of remote interaction with shmem is implemented, i.e. the shmem socket is multifunctional and can not only send data, but also start an action and update shmem data. This allows you to implement shmem actions close to the original system V shared memory from Linux. For example:

  • Delete shmem if the process is not native
  • Count the number of attached and process ids

@twaik

twaik commented Feb 3, 2025

Copy link
Copy Markdown
Member

Is it backward compatible with old implementation? Or is there a way to detect if a client uses old version and switch implementation in runtime?

Comment thread shmem.c
@Maxython
Maxython force-pushed the shmem-improvements branch 3 times, most recently from dce2c1a to 7860a0d Compare February 6, 2025 12:45
@Maxython

Maxython commented Feb 6, 2025

Copy link
Copy Markdown
Member Author

Is it backward compatible with old implementation?

No, the old version of libandroid-shmem is not compatible with the new one.

Or is there a way to detect if a client uses old version and switch implementation in runtime?

I only have an idea how to make the new libandroid-shmem detect old shm (libandroid-shmem) and configure itself for them to work with it. But this means that the functionality of such shm will be limited (i.e. there will be no new features like in the new libandroid-shmem) and such implementation of compatibility will greatly complicate shm processing.

@Maxython
Maxython force-pushed the shmem-improvements branch 5 times, most recently from a27477b to e55e679 Compare February 23, 2025 00:26
@Maxython

Copy link
Copy Markdown
Member Author

For testing, changes from PR #17 were added, but with some modifications.

CC @twaik @michalbednarski

Comment thread shmem.c Outdated
@Maxython
Maxython marked this pull request as draft June 6, 2025 11:57
@Maxython
Maxython force-pushed the shmem-improvements branch 6 times, most recently from ce2d070 to 88e59df Compare August 11, 2026 18:28
+ global socket implementation (test)

The possibility of remote interaction with shmem is implemented, i.e. the shmem socket is multifunctional and can not only send data, but also start an action and update shmem data. This allows you to implement shmem actions close to the original system V shared memory from Linux.
For example:
 - Delete shmem if the process is not native
 - Count the number of attached and process ids
 - Filter shmget actions according to flags (i.e. shmget now understands the IPC_CREAT and IPC_EXCL flags)

Also added new tests to check all these functionalities.
@Maxython
Maxython force-pushed the shmem-improvements branch from 88e59df to 4147a47 Compare August 11, 2026 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants