Compare commits
	
		
			No commits in common. "c8e3356a1d50b83176505e7e834017f66b90d33d" and "5a3fa8f6af4d92cbed50dd103add8d990809f070" have entirely different histories.
		
	
	
		
			c8e3356a1d
			...
			5a3fa8f6af
		
	
		
					 2 changed files with 0 additions and 23 deletions
				
			
		| 
						 | 
				
			
			@ -6,9 +6,6 @@ struct stat;
 | 
			
		|||
 | 
			
		||||
/**
 | 
			
		||||
 * System calls
 | 
			
		||||
 *
 | 
			
		||||
 * Note that none of these calls are implemented in C. They are implemented in assembly in [usys.S](./usys.S). This file
 | 
			
		||||
 * is in turn generated by the [usys.py](./usys.py) script during the build.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/** Create a child process */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										20
									
								
								user/usys.py
									
										
									
									
									
								
							
							
						
						
									
										20
									
								
								user/usys.py
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -42,26 +42,6 @@ assembly = "\n\n".join(map(genstub, syscalls))
 | 
			
		|||
# TODO: Perhaps do some more specific assertions on the code here
 | 
			
		||||
assert len(assembly) > 0, "No assembly code generated. Something is fishy"
 | 
			
		||||
 | 
			
		||||
with open("kernel/syscall.h", "r") as sfile:
 | 
			
		||||
    lines = list(filter(lambda x: x.startswith("#define"), sfile.readlines()))
 | 
			
		||||
 | 
			
		||||
    header_calls = set([line.split()[1] for line in lines])
 | 
			
		||||
    calls = set(["SYS_" + call for call in syscalls])
 | 
			
		||||
 | 
			
		||||
    if header_calls == calls:
 | 
			
		||||
        print("#All items match in both sets.")
 | 
			
		||||
    else:
 | 
			
		||||
        missing_in_calls = header_calls - calls
 | 
			
		||||
        missing_in_header_calls = calls - header_calls
 | 
			
		||||
 | 
			
		||||
        if missing_in_calls:
 | 
			
		||||
            print("#These items are in header_calls but not in calls:", missing_in_calls)
 | 
			
		||||
        if missing_in_header_calls:
 | 
			
		||||
            print(
 | 
			
		||||
                "#These items are in calls but not in header_calls:",
 | 
			
		||||
                missing_in_header_calls,
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
print("# generated by usys.py - do not edit\n")
 | 
			
		||||
print('#include "kernel/syscall.h"\n')
 | 
			
		||||
print(assembly)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue