mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	spa: loop: Change get_time() timeout to unsigned
A signed value doesn't really make sense in this context, so let's keep it unsigned so the semantics are clear. This does break the interface, but should be okay since it's not in a release yet.
This commit is contained in:
		
							parent
							
								
									187df01b5e
								
							
						
					
					
						commit
						c515f9bf8e
					
				
					 2 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
					@ -325,7 +325,7 @@ struct spa_loop_control_methods {
 | 
				
			||||||
	 * Get the current time with \ref timeout that can be used in wait.
 | 
						 * Get the current time with \ref timeout that can be used in wait.
 | 
				
			||||||
	 * Since version 2:2
 | 
						 * Since version 2:2
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	int (*get_time) (void *object, struct timespec *abstime, int64_t timeout);
 | 
						int (*get_time) (void *object, struct timespec *abstime, uint64_t timeout);
 | 
				
			||||||
	/** Wait for a signal
 | 
						/** Wait for a signal
 | 
				
			||||||
	 * Wait until a thread performs signal. Since version 2:2
 | 
						 * Wait until a thread performs signal. Since version 2:2
 | 
				
			||||||
	 *
 | 
						 *
 | 
				
			||||||
| 
						 | 
					@ -404,7 +404,7 @@ SPA_API_LOOP int spa_loop_control_unlock(struct spa_loop_control *object)
 | 
				
			||||||
			spa_loop_control, &object->iface, unlock, 2);
 | 
								spa_loop_control, &object->iface, unlock, 2);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
SPA_API_LOOP int spa_loop_control_get_time(struct spa_loop_control *object,
 | 
					SPA_API_LOOP int spa_loop_control_get_time(struct spa_loop_control *object,
 | 
				
			||||||
		struct timespec *abstime, int64_t timeout)
 | 
							struct timespec *abstime, uint64_t timeout)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	return spa_api_method_r(int, -ENOTSUP,
 | 
						return spa_api_method_r(int, -ENOTSUP,
 | 
				
			||||||
			spa_loop_control, &object->iface, get_time, 2, abstime, timeout);
 | 
								spa_loop_control, &object->iface, get_time, 2, abstime, timeout);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -657,7 +657,7 @@ static int loop_unlock(void *object)
 | 
				
			||||||
		impl->recurse++;
 | 
							impl->recurse++;
 | 
				
			||||||
	return -res;
 | 
						return -res;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
static int loop_get_time(void *object, struct timespec *abstime, int64_t timeout)
 | 
					static int loop_get_time(void *object, struct timespec *abstime, uint64_t timeout)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	if (clock_gettime(CLOCK_REALTIME, abstime) < 0)
 | 
						if (clock_gettime(CLOCK_REALTIME, abstime) < 0)
 | 
				
			||||||
		return -errno;
 | 
							return -errno;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue