milan-avb: lock: make it lockable:

1. The period calls were added to handle timeouts.
2. Handle the case where lock must be unlocked after 60s if the
   controller owning the locked does not release it.
This commit is contained in:
hackerman-kl 2026-04-16 08:10:14 +02:00 committed by hackerman-kl
parent adad89dc0e
commit c551acf4d1
5 changed files with 112 additions and 0 deletions

View file

@ -86,6 +86,12 @@ static int aecp_message(void *data, uint64_t now, const void *message, int len)
return info->handle(aecp, message, len);
}
static void aecp_periodic(void *data, uint64_t now)
{
struct aecp *aecp = data;
avb_aecp_aem_periodic(aecp, (int64_t)now);
}
static void aecp_destroy(void *data)
{
struct aecp *aecp = data;
@ -124,6 +130,7 @@ static const struct server_events server_events = {
AVB_VERSION_SERVER_EVENTS,
.destroy = aecp_destroy,
.message = aecp_message,
.periodic = aecp_periodic,
.command = aecp_command
};